[PATCH] test: expand argument parsing sanity checks
Jani Nikula
jani at nikula.org
Sat Nov 11 01:13:32 PST 2017
Test the boolean --arg=true and --arg=false formats.
---
Extracted from id:20171014131608.17587-1-jani at nikula.org as this makes
sense independent of that series.
---
test/T410-argument-parsing.sh | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/test/T410-argument-parsing.sh b/test/T410-argument-parsing.sh
index 71ed7e38553b..910843d684c6 100755
--- a/test/T410-argument-parsing.sh
+++ b/test/T410-argument-parsing.sh
@@ -37,4 +37,18 @@ positional arg 1 false
EOF
test_expect_equal_file EXPECTED OUTPUT
+test_begin_subtest "--boolean=true"
+$TEST_DIRECTORY/arg-test --boolean=true > OUTPUT
+cat <<EOF > EXPECTED
+boolean 1
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "--boolean=false"
+$TEST_DIRECTORY/arg-test --boolean=false > OUTPUT
+cat <<EOF > EXPECTED
+boolean 0
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
test_done
--
2.11.0
More information about the notmuch
mailing list