aboutsummaryrefslogtreecommitdiff
path: root/t/t0040-parse-options.sh
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2008-03-02 11:35:56 +0100
committerJunio C Hamano <gitster@pobox.com>2008-03-02 14:07:47 -0800
commit580d5bffdea56dfae1e745dbda94f326bb161274 (patch)
treed5a51ee13a14c7944f196395aa2f2d9c302625ef /t/t0040-parse-options.sh
parentff962a3f1900966d008d6f9eaf32095c42322b9d (diff)
downloadgit-580d5bffdea56dfae1e745dbda94f326bb161274.tar.gz
git-580d5bffdea56dfae1e745dbda94f326bb161274.tar.xz
parse-options: new option type to treat an option-like parameter as an argument.
This is meant to be used to keep --not and --all during revision parsing. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 0e2933a98..c23f0ace8 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