aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-01-26 23:00:24 -0300
committerEuAndreh <eu@euandre.org>2021-01-26 23:11:02 -0300
commit01d37764238bca11f22601e8ee69d0b3d38d93c5 (patch)
treec9a78ab3774319710c76aae307102b3290ec77ca /tests
parentmanifest.scm: Add groff package, fix CI build (diff)
downloadremembering-01d37764238bca11f22601e8ee69d0b3d38d93c5.tar.gz
remembering-01d37764238bca11f22601e8ee69d0b3d38d93c5.tar.xz
remembering: Add -V version flag, add missing docs on -h flag
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cli-opts.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/cli-opts.sh b/tests/cli-opts.sh
index 0562517..6957e4e 100755
--- a/tests/cli-opts.sh
+++ b/tests/cli-opts.sh
@@ -112,6 +112,22 @@ test_help_flags() {
test_ok
}
+test_version_flags() {
+ testing 'version flags'
+ OUT="$(mktemp)"
+ ERR="$(mktemp)"
+ sh remembering -V 1>"$OUT" 2>"$ERR"
+ STATUS=$?
+ assert_status 0
+ assert_empty_stderr
+ if ! grep -Eq '^remembering-.+$' "$OUT"; then
+ printf '\nERR: Bad STDOUT (%s)\n\nexpected: %s\ngot: %s\n' \
+ "$OUT" '^remembering-.+$' "$(cat "$OUT")" >&2
+ exit 1
+ fi
+ test_ok
+}
+
test_unsupported_long_flags
test_missing_required_flags
test_missing_required_flags
@@ -119,3 +135,4 @@ test_single_required_flag
test_flags_without_required_argument
test_valid_options
test_help_flags
+test_version_flags