summaryrefslogtreecommitdiffstats
path: root/tests/opt.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-11-28 10:54:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-11-28 10:54:21 (GMT)
commitd473f1507c154f001a28c74e520d79d0b8edd8e3 (patch)
tree39a24e5108e45c670b7845495a8d188cbf7583d2 /tests/opt.test
parent627fe239a59a6000e68c217f764dd32e9dc3565c (diff)
downloadtcl-d473f1507c154f001a28c74e520d79d0b8edd8e3.zip
tcl-d473f1507c154f001a28c74e520d79d0b8edd8e3.tar.gz
tcl-d473f1507c154f001a28c74e520d79d0b8edd8e3.tar.bz2
Update "opt" from version 0.4.5 to 0.4.7, backported from Tcl 8.7a3.
Diffstat (limited to 'tests/opt.test')
-rw-r--r--tests/opt.test22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/opt.test b/tests/opt.test
index ba59f6c..8b7289a 100644
--- a/tests/opt.test
+++ b/tests/opt.test
@@ -77,7 +77,7 @@ test opt-6.1 {OptKeyParse} {
} {1 {Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
- ( -help gives this help )}}
+ (-help gives this help)}}
test opt-7.1 {OptCheckType} {
list \
@@ -159,9 +159,9 @@ test opt-10.1 {ambigous flags} {
catch {optTest -fL} msg
set msg
} {ambigous option "-fL", choose from:
- -fla boolflag (false)
- -flag2xyz boolflag (false)
- -flag3xyz boolflag (false) }
+ -fla boolflag (false)
+ -flag2xyz boolflag (false)
+ -flag3xyz boolflag (false)}
test opt-10.2 {non ambigous flags} {
::tcl::OptProc optTest {{-flag1xyz} {-other} {-flag2xyz} {-flag3xyz}} {
return $flag2xyz
@@ -181,8 +181,8 @@ test opt-10.4 {ambigous flags, not exact match} {
catch {optTest -fLag1X} msg
set msg
} {ambigous option "-fLag1X", choose from:
- -flag1xy boolflag (false)
- -flag1xyz boolflag (false) }
+ -flag1xy boolflag (false)
+ -flag1xyz boolflag (false)}
# medium size overall test example: (defined once)
::tcl::OptProc optTest {
@@ -204,12 +204,12 @@ test opt-10.6 {medium size overall test} {
} {1 {Usage information:
Var/FlagName Type Value Help
------------ ---- ----- ----
- ( -help gives this help )
+ (-help gives this help)
cmd choice (print save delete) sub command to choose
- -allowBoing boolean (true)
+ -allowBoing boolean (true)
arg2 string () this is help
?arg3? int (7) optional number
- -moreflags boolflag (false) }}
+ -moreflags boolflag (false)}}
test opt-10.7 {medium size overall test} {
optTest save tst
} {save 1 tst 7 0}
@@ -230,8 +230,8 @@ test opt-11.1 {too many args test 2} {
} {1 {too many arguments (unexpected argument(s): blah), usage:
Var/FlagName Type Value Help
------------ ---- ----- ----
- ( -help gives this help )
- -foo boolflag (false) } {}}
+ (-help gives this help)
+ -foo boolflag (false)} {}}
test opt-11.2 {default value for args} {
set args {}
set key [::tcl::OptKeyRegister {{args -list {a b c} "args..."}}]