summaryrefslogtreecommitdiffstats
path: root/test/t2400-aurblup.t
diff options
context:
space:
mode:
authorFrédéric Mangano-Tarumi <fmang@mg0.fr>2020-02-23 19:53:13 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2020-02-27 16:44:36 +0100
commite374a91febe53b72ff4cb73b153348f067374c68 (patch)
tree038973590aace5ba4f4899cc256d843ef2505867 /test/t2400-aurblup.t
parent81d55e70ee0469018af86d203ceaf2fece691ea8 (diff)
downloadaur-e374a91febe53b72ff4cb73b153348f067374c68.tar.gz
aur-e374a91febe53b72ff4cb73b153348f067374c68.tar.xz
Change the extension of TAP test suites to .t
This is the common convention for TAP, and makes harnesses like prove automatically detect them. Plus, test suites don’t have to be shell scripts anymore. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'test/t2400-aurblup.t')
-rwxr-xr-xtest/t2400-aurblup.t53
1 files changed, 53 insertions, 0 deletions
diff --git a/test/t2400-aurblup.t b/test/t2400-aurblup.t
new file mode 100755
index 00000000..708281c6
--- /dev/null
+++ b/test/t2400-aurblup.t
@@ -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