diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2009-05-07 21:45:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-05-09 00:29:50 -0700 |
commit | 51a9949eda7421a2dd9cb45b2110d6571ba09bbd (patch) | |
tree | 319237eb500050e73ddd9b6e5dee585a41dc4b69 /t/t0040-parse-options.sh | |
parent | e0319ff5ed2b7927302389181449dcd029a26622 (diff) | |
download | git-51a9949eda7421a2dd9cb45b2110d6571ba09bbd.tar.gz |
parseopt: add PARSE_OPT_NODASH
Add support for options that don't start with a dash. Initially, they
don't accept arguments and can only be short options, i.e. consist of a
single character.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0040-parse-options.sh')
-rwxr-xr-x | t/t0040-parse-options.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh index 8ca62ef453..a40c1236c0 100755 --- a/t/t0040-parse-options.sh +++ b/t/t0040-parse-options.sh @@ -31,6 +31,7 @@ String options Magic arguments --quux means --quux -NUM set integer to NUM + + same as -b Standard options --abbrev[=<n>] use <n> digits to display SHA-1s @@ -276,6 +277,12 @@ test_expect_success 'OPT_NEGBIT() works' ' test_cmp expect output ' +test_expect_success 'OPT_BOOLEAN() with PARSE_OPT_NODASH works' ' + test-parse-options + + + + + + > output 2> output.err && + test ! -s output.err && + test_cmp expect output +' + cat > expect <<EOF boolean: 0 integer: 12345 |