diff options
author | EuAndreh <eu@euandre.org> | 2021-06-26 13:17:29 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-26 13:17:29 -0300 |
commit | 9069f9eb2396a56e2d1b7300dc20940281420c0a (patch) | |
tree | e6340aee81dd2f55e4f9599b73bcfe7489e0d54e /tests/remotes.sh | |
parent | mv src/git-permalink.sh.in src/git-permalin.in (diff) | |
download | git-permalink-9069f9eb2396a56e2d1b7300dc20940281420c0a.tar.gz git-permalink-9069f9eb2396a56e2d1b7300dc20940281420c0a.tar.xz |
tests/*.sh: Print line number, STDOUT and STDERR when test fails
Diffstat (limited to 'tests/remotes.sh')
-rwxr-xr-x | tests/remotes.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/remotes.sh b/tests/remotes.sh index 4d6a8a2..3ed842c 100755 --- a/tests/remotes.sh +++ b/tests/remotes.sh @@ -31,6 +31,7 @@ new_repo() { test_supported_remotes() { testing 'supported remotes' + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" new_repo git://euandreh.xyz/remembering @@ -42,6 +43,7 @@ test_supported_remotes() { assert_fgrep_stderr 'xdg-open: https://git.euandreh.xyz' cd - > /dev/null || exit 1 + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" new_repo https://git.sr.ht/~sircmpwn/ctools @@ -52,6 +54,7 @@ test_supported_remotes() { assert_empty_stderr cd - > /dev/null || exit 1 + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" new_repo https://git.kernel.org/pub/scm/git/git.git @@ -63,6 +66,7 @@ test_supported_remotes() { assert_fgrep_stderr 'xdg-open: https://git.kernel.org' cd - > /dev/null || exit 1 + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" new_repo https://git.savannah.gnu.org/guix.git @@ -73,6 +77,7 @@ test_supported_remotes() { assert_empty_stderr cd - > /dev/null || exit 1 + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" new_repo https://notabug.org/cwebber/guile-gcrypt @@ -84,6 +89,7 @@ test_supported_remotes() { assert_fgrep_stderr 'xdg-open: https://notabug.org' cd - > /dev/null || exit 1 + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" new_repo https://codeberg.org/dnkl/yambar @@ -94,6 +100,7 @@ test_supported_remotes() { assert_empty_stderr cd - > /dev/null || exit 1 + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" new_repo https://bitbucket.org/uprojects/jsmn @@ -105,6 +112,7 @@ test_supported_remotes() { assert_fgrep_stderr 'xdg-open: https://bitbucket.org' cd - > /dev/null || exit 1 + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" new_repo https://pagure.io/aquedoc @@ -115,6 +123,7 @@ test_supported_remotes() { assert_empty_stderr cd - > /dev/null || exit 1 + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" new_repo https://gitlab.com/nonguix/nonguix @@ -126,6 +135,7 @@ test_supported_remotes() { assert_fgrep_stderr 'xdg-open: https://gitlab.com/nonguix/nonguix' cd - > /dev/null || exit 1 + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" new_repo https://github.com/skeeto/elfeed @@ -142,6 +152,7 @@ test_supported_remotes() { test_unsupported_remote() { testing 'unsupported remotes' + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" new_repo https://example.com/a/b @@ -151,6 +162,7 @@ test_unsupported_remote() { assert_empty_stdout assert_fgrep_stderr 'Unsupported origin: https://example.com' + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" git config git-permalink.template-commit-file 'before %s middle %s after' @@ -160,6 +172,7 @@ test_unsupported_remote() { assert_grep_stdout 'before .+ middle README.md after' assert_empty_stderr + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" git config --unset git-permalink.template-commit-file @@ -170,6 +183,7 @@ test_unsupported_remote() { assert_grep_stdout 'before README.md middle .+ after' assert_empty_stderr + N="$LINENO" OUT="$(mktemp)" ERR="$(mktemp)" git config --unset git-permalink.template-file-commit |