summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-05-02 22:30:19 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-05-02 22:50:36 -0400
commit3f4c2e4f1f3d28981e5121af97206cdc85427042 (patch)
tree3d0906575cee3efb03285086ffa5c7c486fef342 /test
parentebbde88b7c08a5e9fe9ba8aca1ca2ac2dbd1b41d (diff)
libredbdiff: make repos be a true array, make it configurable
Diffstat (limited to 'test')
-rw-r--r--test/libredbdiff-test.sh14
-rw-r--r--test/libredbdiff.d/expected-explicit.txt (renamed from test/libredbdiff.d/expected.txt)0
-rw-r--r--test/libredbdiff.d/expected-implicit.txt2
3 files changed, 14 insertions, 2 deletions
diff --git a/test/libredbdiff-test.sh b/test/libredbdiff-test.sh
index 1b267e3..0ded607 100644
--- a/test/libredbdiff-test.sh
+++ b/test/libredbdiff-test.sh
@@ -9,6 +9,7 @@ common_before() {
'statedir="$PWD"' \
"mirror='http://repo.parabola.nu/\$repo/os/\$arch'" \
"mirrorarch='http://mirrors.kernel.org/archlinux/\$repo/os/\$arch'" \
+ 'repos=(libre)' \
> $XDG_CONFIG_HOME/libretools/libredbdiff.conf
}
@@ -19,11 +20,20 @@ it_displays_help() {
empty $tmpdir/stderr
}
-it_handles_packages_with_multiple_provides() {
+it_handles_packages_with_multiple_provides_explicit() {
cd libredbdiff.d/statedir
libredbdiff -n libre >$tmpdir/stdout 2>$tmpdir/stderr
empty $tmpdir/stderr
- diff -w ../expected.txt $tmpdir/stdout
+ diff -w ../expected-explicit.txt $tmpdir/stdout
+}
+
+it_handles_packages_with_multiple_provides_implicit() {
+ cd libredbdiff.d/statedir
+
+ libredbdiff -n >$tmpdir/stdout 2>$tmpdir/stderr
+
+ empty $tmpdir/stderr
+ diff -w ../expected-implicit.txt $tmpdir/stdout
}
diff --git a/test/libredbdiff.d/expected.txt b/test/libredbdiff.d/expected-explicit.txt
index 8fb89bf..8fb89bf 100644
--- a/test/libredbdiff.d/expected.txt
+++ b/test/libredbdiff.d/expected-explicit.txt
diff --git a/test/libredbdiff.d/expected-implicit.txt b/test/libredbdiff.d/expected-implicit.txt
new file mode 100644
index 0000000..afc2689
--- /dev/null
+++ b/test/libredbdiff.d/expected-implicit.txt
@@ -0,0 +1,2 @@
+[libre]
+p linux-libre linux 4.10.12_gnu-2 | 4.10.13-1