aboutsummaryrefslogtreecommitdiff
path: root/tests/install-uninstall.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-26 16:17:47 -0300
committerEuAndreh <eu@euandre.org>2021-06-26 16:17:47 -0300
commitd1e6645125f1877eb4fc291e74aeca0cca94daea (patch)
treedab1cffc3a2d48e6d032c7365bf12894302f00cd /tests/install-uninstall.sh
parentaux/workflow/l10n.sh: mkdir -p doc/po (diff)
downloadgit-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-xtests/install-uninstall.sh20
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
}