diff options
author | EuAndreh <eu@euandre.org> | 2021-06-27 08:32:45 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-27 08:36:11 -0300 |
commit | c58af8dbbe5763cc1b188009d29d0e540ae0f478 (patch) | |
tree | 5890dab9433c01081619c2b430d77ec298f2e162 /tests/cli-opts.sh | |
parent | src/git-permalink.in: Fix ShellCheck offense, remove disable (diff) | |
download | git-permalink-c58af8dbbe5763cc1b188009d29d0e540ae0f478.tar.gz git-permalink-c58af8dbbe5763cc1b188009d29d0e540ae0f478.tar.xz |
src/git-permalink.in: Return 2 on unrecognized CLI option
Diffstat (limited to 'tests/cli-opts.sh')
-rwxr-xr-x | tests/cli-opts.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/cli-opts.sh b/tests/cli-opts.sh index d5783e2..3cda865 100755 --- a/tests/cli-opts.sh +++ b/tests/cli-opts.sh @@ -100,10 +100,8 @@ test_help_flags() { ERR="$(mktemp)" LANG=en_US.UTF-8 sh src/git-permalink --something something -h 1>"$OUT" 2>"$ERR" STATUS=$? - assert_status 0 - assert_usage "$OUT" - assert_fgrep_stdout 'Usage' - assert_fgrep_stdout 'Options' + assert_status 2 + assert_usage "$ERR" N="$LINENO" OUT="$(mktemp)" |