aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-13 19:02:21 -0300
committerEuAndreh <eu@euandre.org>2021-06-13 19:02:21 -0300
commit8dd0b046c2a4c9560113756ccf4cb396e0068217 (patch)
tree84f9fbd7fba90934c4a2e85b608b9ce9f222b0c2 /tests
parenttests/cli-opts.sh: Refactor tests to use assert_grep_stdout over assert_grep_... (diff)
downloadremembering-8dd0b046c2a4c9560113756ccf4cb396e0068217.tar.gz
remembering-8dd0b046c2a4c9560113756ccf4cb396e0068217.tar.xz
tests/cli-opts.sh: Test help flags on different position too
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cli-opts.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/cli-opts.sh b/tests/cli-opts.sh
index 630fd29..0ecc2ef 100755
--- a/tests/cli-opts.sh
+++ b/tests/cli-opts.sh
@@ -106,6 +106,22 @@ test_help_flags() {
assert_empty_stderr
assert_usage "$OUT"
+ OUT="$(mktemp)"
+ ERR="$(mktemp)"
+ ./remembering -p profile -c command --help 1>"$OUT" 2>"$ERR"
+ STATUS=$?
+ assert_status 0
+ assert_empty_stderr
+ assert_usage "$OUT"
+
+ OUT="$(mktemp)"
+ ERR="$(mktemp)"
+ ./remembering --help -p profile -c command 1>"$OUT" 2>"$ERR"
+ STATUS=$?
+ assert_status 0
+ assert_empty_stderr
+ assert_usage "$OUT"
+
test_ok
}