Update wiki links to the new short URL
[aur.git] / test / t2400-aurblup.t
blobcc287a0fc71ed3322da69c0f79770e5cabec4a00
1 #!/bin/sh
3 test_description='aurblup tests'
5 . "$(dirname "$0")/setup.sh"
7 test_expect_success 'Test official provider update script.' '
8 mkdir -p remote/test/foobar-1.0-1 &&
9 cat <<-EOD >remote/test/foobar-1.0-1/desc &&
10 %FILENAME%
11 foobar-1.0-any.pkg.tar.xz
13 %NAME%
14 foobar
16 %VERSION%
17 1.0-1
19 %ARCH%
20 any
21 EOD
22 mkdir -p remote/test/foobar2-1.0-1 &&
23 cat <<-EOD >remote/test/foobar2-1.0-1/desc &&
24 %FILENAME%
25 foobar2-1.0-any.pkg.tar.xz
27 %NAME%
28 foobar2
30 %VERSION%
31 1.0-1
33 %ARCH%
34 any
36 %PROVIDES%
37 foobar3
38 foobar4
39 EOD
40 ( cd remote/test && bsdtar -czf ../test.db * ) &&
41 mkdir sync &&
42 "$AURBLUP" &&
43 cat <<-EOD >expected &&
44 foobar|test|foobar
45 foobar2|test|foobar2
46 foobar2|test|foobar3
47 foobar2|test|foobar4
48 EOD
49 echo "SELECT Name, Repo, Provides FROM OfficialProviders ORDER BY Provides;" | sqlite3 aur.db >actual &&
50 test_cmp actual expected
53 test_done