#!/usr/bin/env roundup describe libredbdiff . ./test-common.sh common_before() { mkdir -p "$XDG_CONFIG_HOME/libretools" printf '%s\n' \ '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 } it_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 libredbdiff -n libre >$tmpdir/stdout 2>$tmpdir/stderr empty $tmpdir/stderr 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 }