aboutsummaryrefslogtreecommitdiff
path: root/tests/install-uninstall.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-26 13:17:29 -0300
committerEuAndreh <eu@euandre.org>2021-06-26 13:17:29 -0300
commit9069f9eb2396a56e2d1b7300dc20940281420c0a (patch)
treee6340aee81dd2f55e4f9599b73bcfe7489e0d54e /tests/install-uninstall.sh
parentmv src/git-permalink.sh.in src/git-permalin.in (diff)
downloadgit-permalink-9069f9eb2396a56e2d1b7300dc20940281420c0a.tar.gz
git-permalink-9069f9eb2396a56e2d1b7300dc20940281420c0a.tar.xz
tests/*.sh: Print line number, STDOUT and STDERR when test fails
Diffstat (limited to 'tests/install-uninstall.sh')
-rwxr-xr-xtests/install-uninstall.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/install-uninstall.sh b/tests/install-uninstall.sh
index c0b402a..6bfdac0 100755
--- a/tests/install-uninstall.sh
+++ b/tests/install-uninstall.sh
@@ -9,6 +9,7 @@ PATH="$TEST_DESTDIR/usr/local/bin:$PATH"
test_install_uninstall_targets() {
testing 'install uninstall targets'
+ N="$LINENO"
OUT="$(mktemp)"
ERR="$(mktemp)"
make DESTDIR="$TEST_DESTDIR" install 1>"$OUT" 2>"$ERR"
@@ -18,6 +19,7 @@ test_install_uninstall_targets() {
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"
@@ -26,6 +28,7 @@ test_install_uninstall_targets() {
assert_stdout '5'
assert_empty_stderr
+ N="$LINENO"
OUT="$(mktemp)"
ERR="$(mktemp)"
make DESTDIR="$TEST_DESTDIR" uninstall 1>"$OUT" 2>"$ERR"
@@ -35,6 +38,7 @@ test_install_uninstall_targets() {
assert_empty_stdout
assert_fgrep_stderr 'not a git command'
+ N="$LINENO"
OUT="$(mktemp)"
ERR="$(mktemp)"
find "$TEST_DESTDIR" -type f | wc -l 1>"$OUT" 2>"$ERR"