summaryrefslogtreecommitdiff
path: root/t/t0040-parse-options.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2008-03-08 21:29:59 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-03-08 21:29:59 -0800
commit1cbcefb107776ce2da374697bb4f6e2bd22ff73f (patch)
tree1d1bcd19b1433a8c18220e083414be93881657ca /t/t0040-parse-options.sh
parentMerge branch 'dp/clean-fix' (diff)
parentparse-options: new option type to treat an option-like parameter as an argument. (diff)
downloadtgif-1cbcefb107776ce2da374697bb4f6e2bd22ff73f.tar.xz
Merge branch 'ph/parseopt'
* ph/parseopt: parse-options: new option type to treat an option-like parameter as an argument. parse-opt: bring PARSE_OPT_HIDDEN and NONEG to git-rev-parse --parseopt
Diffstat (limited to 't/t0040-parse-options.sh')
-rwxr-xr-xt/t0040-parse-options.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh
index 0e2933a984..c23f0ace85 100755
--- a/t/t0040-parse-options.sh
+++ b/t/t0040-parse-options.sh
@@ -21,6 +21,9 @@ string options
--st <st> get another string (pervert ordering)
-o <str> get another string
+magic arguments
+ --quux means --quux
+
EOF
test_expect_success 'test help' '
@@ -114,4 +117,17 @@ test_expect_success 'detect possible typos' '
git diff expect.err output.err
'
+cat > expect <<EOF
+boolean: 0
+integer: 0
+string: (not set)
+arg 00: --quux
+EOF
+
+test_expect_success 'keep some options as arguments' '
+ test-parse-options --quux > output 2> output.err &&
+ test ! -s output.err &&
+ git diff expect output
+'
+
test_done