summaryrefslogtreecommitdiff
path: root/t/helper/test-parse-options.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-02-20 14:15:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-02-20 21:20:40 (GMT)
commit62e7a6f7a1427f461e72ccd5acebc200d55747e0 (patch)
treeeabf4c8a8e76e4f7114c83d290529a0df67a5fa2 /t/helper/test-parse-options.c
parentd0654dc308b0ba76dd8ed7bbb33c8d8f7aacd783 (diff)
downloadgit-62e7a6f7a1427f461e72ccd5acebc200d55747e0.zip
git-62e7a6f7a1427f461e72ccd5acebc200d55747e0.tar.gz
git-62e7a6f7a1427f461e72ccd5acebc200d55747e0.tar.bz2
parse-options: add testcases for OPT_CMDMODE()
Before modifying the implementation, ensure that general operation of OPT_CMDMODE() and detection of incompatible options are covered. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-parse-options.c')
-rw-r--r--t/helper/test-parse-options.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/helper/test-parse-options.c b/t/helper/test-parse-options.c
index af82db0..2051ce5 100644
--- a/t/helper/test-parse-options.c
+++ b/t/helper/test-parse-options.c
@@ -121,6 +121,8 @@ int cmd__parse_options(int argc, const char **argv)
OPT_INTEGER('j', NULL, &integer, "get a integer, too"),
OPT_MAGNITUDE('m', "magnitude", &magnitude, "get a magnitude"),
OPT_SET_INT(0, "set23", &integer, "set integer to 23", 23),
+ OPT_CMDMODE(0, "mode1", &integer, "set integer to 1 (cmdmode option)", 1),
+ OPT_CMDMODE(0, "mode2", &integer, "set integer to 2 (cmdmode option)", 2),
OPT_CALLBACK('L', "length", &integer, "str",
"get length of <str>", length_callback),
OPT_FILENAME('F', "file", &file, "set file to <file>"),