summaryrefslogtreecommitdiff
path: root/t/t0040-parse-options.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t0040-parse-options.sh')
-rwxr-xr-xt/t0040-parse-options.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh
index 9054ed6..8ca62ef 100755
--- a/t/t0040-parse-options.sh
+++ b/t/t0040-parse-options.sh
@@ -30,6 +30,7 @@ String options
Magic arguments
--quux means --quux
+ -NUM set integer to NUM
Standard options
--abbrev[=<n>] use <n> digits to display SHA-1s
@@ -275,4 +276,21 @@ test_expect_success 'OPT_NEGBIT() works' '
test_cmp expect output
'
+cat > expect <<EOF
+boolean: 0
+integer: 12345
+timestamp: 0
+string: (not set)
+abbrev: 7
+verbose: 0
+quiet: no
+dry run: no
+EOF
+
+test_expect_success 'OPT_NUMBER_CALLBACK() works' '
+ test-parse-options -12345 > output 2> output.err &&
+ test ! -s output.err &&
+ test_cmp expect output
+'
+
test_done