diff options
author | EuAndreh <eu@euandre.org> | 2021-06-26 16:17:47 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-26 16:17:47 -0300 |
commit | d1e6645125f1877eb4fc291e74aeca0cca94daea (patch) | |
tree | dab1cffc3a2d48e6d032c7365bf12894302f00cd /tests/install-uninstall.sh | |
parent | aux/workflow/l10n.sh: mkdir -p doc/po (diff) | |
download | git-permalink-d1e6645125f1877eb4fc291e74aeca0cca94daea.tar.gz git-permalink-d1e6645125f1877eb4fc291e74aeca0cca94daea.tar.xz |
tests/install-uninstall.sh: Allow git-permalink to already be installed; laxer assertions on STDERR
Diffstat (limited to 'tests/install-uninstall.sh')
-rwxr-xr-x | tests/install-uninstall.sh | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/tests/install-uninstall.sh b/tests/install-uninstall.sh index 6bfdac0..c24a118 100755 --- a/tests/install-uninstall.sh +++ b/tests/install-uninstall.sh @@ -12,40 +12,36 @@ test_install_uninstall_targets() { N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" - make DESTDIR="$TEST_DESTDIR" install 1>"$OUT" 2>"$ERR" - git permalink -V 1>"$OUT" 2>"$ERR" + make DESTDIR="$TEST_DESTDIR" install 1>>"$OUT" 2>>"$ERR" + git permalink -V 1>>"$OUT" 2>>"$ERR" STATUS=$? assert_status 0 assert_grep_stdout '^git-permalink-[0-9\.]+ [0-9-]+$' - assert_empty_stderr N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" - find "$TEST_DESTDIR" -type f | wc -l 1>"$OUT" 2>"$ERR" + command -v git-permalink 1>"$OUT" 2>"$ERR" STATUS=$? assert_status 0 - assert_stdout '5' - assert_empty_stderr + assert_stdout "$TEST_DESTDIR/usr/local/bin/git-permalink" N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" - make DESTDIR="$TEST_DESTDIR" uninstall 1>"$OUT" 2>"$ERR" - LANG=POSIX git permalink -V 1>"$OUT" 2>"$ERR" + find "$TEST_DESTDIR" -type f | wc -l 1>"$OUT" 2>"$ERR" STATUS=$? - assert_status 1 - assert_empty_stdout - assert_fgrep_stderr 'not a git command' + assert_status 0 + assert_stdout '5' N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" + make DESTDIR="$TEST_DESTDIR" uninstall 1>>"$OUT" 2>>"$ERR" find "$TEST_DESTDIR" -type f | wc -l 1>"$OUT" 2>"$ERR" STATUS=$? assert_status 0 assert_stdout '0' - assert_empty_stderr test_ok } |