diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2016-10-17 15:34:21 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2016-10-17 15:34:21 +0200 |
commit | fdd932ff8d5e5899cfeae9a8b29011fa2cf9d439 (patch) | |
tree | 07afb8664e18e4d4fb479525b16db6edf026b72b /test/t2400-aurblup.sh | |
parent | b091fb77580d56dbdca6424f9065581945b8e815 (diff) | |
parent | c3f464f50fb35ffb7825b90437bd912051a994ee (diff) |
Merge branch 'master' into maintaurweb/maint
Diffstat (limited to 'test/t2400-aurblup.sh')
-rwxr-xr-x | test/t2400-aurblup.sh | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/test/t2400-aurblup.sh b/test/t2400-aurblup.sh new file mode 100755 index 0000000..708281c --- /dev/null +++ b/test/t2400-aurblup.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +test_description='aurblup tests' + +. ./setup.sh + +test_expect_success 'Test official provider update script.' ' + mkdir -p remote/test/foobar-1.0-1 && + cat <<-EOD >remote/test/foobar-1.0-1/desc && + %FILENAME% + foobar-1.0-any.pkg.tar.xz + + %NAME% + foobar + + %VERSION% + 1.0-1 + + %ARCH% + any + EOD + mkdir -p remote/test/foobar2-1.0-1 && + cat <<-EOD >remote/test/foobar2-1.0-1/desc && + %FILENAME% + foobar2-1.0-any.pkg.tar.xz + + %NAME% + foobar2 + + %VERSION% + 1.0-1 + + %ARCH% + any + + %PROVIDES% + foobar3 + foobar4 + EOD + ( cd remote/test && bsdtar -czf ../test.db * ) && + mkdir sync && + "$AURBLUP" && + cat <<-EOD >expected && + foobar|test|foobar + foobar2|test|foobar2 + foobar2|test|foobar3 + foobar2|test|foobar4 + EOD + echo "SELECT Name, Repo, Provides FROM OfficialProviders ORDER BY Provides;" | sqlite3 aur.db >actual && + test_cmp actual expected +' + +test_done |