diff options
Diffstat (limited to 'test/cases/libredbdiff.bats')
-rw-r--r-- | test/cases/libredbdiff.bats | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/test/cases/libredbdiff.bats b/test/cases/libredbdiff.bats index 6cebbf6..ed19b6d 100644 --- a/test/cases/libredbdiff.bats +++ b/test/cases/libredbdiff.bats @@ -1,10 +1,7 @@ -#!/usr/bin/env roundup +load ../lib/common -describe libredbdiff -. ./test-common.sh - -before() { - common_before +setup() { + common_setup install -Dm644 /dev/stdin "$XDG_CONFIG_HOME/libretools/libredbdiff.conf" <<-'eot' statedir="$PWD" @@ -14,15 +11,15 @@ before() { eot } -it_displays_help() { +@test "libredbdiff displays help" { LC_ALL=C libredbdiff -h >$tmpdir/stdout 2>$tmpdir/stderr [[ "$(sed 1q $tmpdir/stdout)" =~ Usage:.* ]] empty $tmpdir/stderr } -it_handles_packages_with_multiple_provides_explicit() { - cd libredbdiff.d/statedir +@test "libredbdiff handles packages with multiple provides explicit" { + cd fixtures/libredbdiff/statedir libredbdiff -n libre >$tmpdir/stdout 2>$tmpdir/stderr @@ -30,8 +27,8 @@ it_handles_packages_with_multiple_provides_explicit() { diff -w ../expected-explicit.txt $tmpdir/stdout } -it_handles_packages_with_multiple_provides_implicit() { - cd libredbdiff.d/statedir +@test "libredbdiff handles packages with multiple provides implicit" { + cd fixtures/libredbdiff/statedir libredbdiff -n >$tmpdir/stdout 2>$tmpdir/stderr @@ -39,8 +36,8 @@ it_handles_packages_with_multiple_provides_implicit() { diff -w ../expected-implicit.txt $tmpdir/stdout } -it_fails_on_bad_repo_args() { - cd libredbdiff.d/statedir +@test "libredbdiff fails on bad repo args" { + cd fixtures/libredbdiff/statedir libredbdiff -n bogus >$tmpdir/stdout 2>$tmpdir/stderr || status=$? |