summaryrefslogtreecommitdiffstats
path: root/tests/indexObj.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/indexObj.test')
-rw-r--r--tests/indexObj.test37
1 files changed, 27 insertions, 10 deletions
diff --git a/tests/indexObj.test b/tests/indexObj.test
index 6be0eb4..4ff1a6f 100644
--- a/tests/indexObj.test
+++ b/tests/indexObj.test
@@ -142,29 +142,46 @@ test indexObj-6.6 {Tcl_GetIndexFromObjStruct with NULL input} -constraints testi
test indexObj-7.1 {Tcl_ParseArgsObjv} testparseargs {
testparseargs
-} {0 1 testparseargs}
+} {0 1 testparseargs NULL NULL}
test indexObj-7.2 {Tcl_ParseArgsObjv} testparseargs {
testparseargs -bool
-} {1 1 testparseargs}
+} {1 1 testparseargs NULL NULL}
test indexObj-7.3 {Tcl_ParseArgsObjv} testparseargs {
testparseargs -bool bar
-} {1 2 {testparseargs bar}}
+} {1 2 {testparseargs bar} NULL NULL}
test indexObj-7.4 {Tcl_ParseArgsObjv} testparseargs {
testparseargs bar
-} {0 2 {testparseargs bar}}
+} {0 2 {testparseargs bar} NULL NULL}
test indexObj-7.5 {Tcl_ParseArgsObjv} -constraints testparseargs -body {
testparseargs -help
} -returnCodes error -result {Command-specific options:
- -bool: booltest
- --: Marks the end of the options
- -help: Print summary of command-line options and abort}
+ -bool: booltest
+ -colormode: color mode
+ -media: media page size
+ --: Marks the end of the options
+ -help: Print summary of command-line options and abort}
test indexObj-7.6 {Tcl_ParseArgsObjv} testparseargs {
testparseargs -- -bool -help
-} {0 3 {testparseargs -bool -help}}
+} {0 3 {testparseargs -bool -help} NULL NULL}
test indexObj-7.7 {Tcl_ParseArgsObjv memory management} testparseargs {
testparseargs 1 2 3 4 5 6 7 8 9 0 -bool 1 2 3 4 5 6 7 8 9 0
-} {1 21 {testparseargs 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0}}
-
+} {1 21 {testparseargs 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0} NULL NULL}
+test indexObj-7.8 {Tcl_ParseArgsObjv} testparseargs {
+ testparseargs -color Nothing
+} {0 1 testparseargs Nothing NULL}
+test indexObj-7.9 {Tcl_ParseArgsObjv} {testparseargs knownBug} {
+ testparseargs -media A4
+} {0 1 testparseargs NULL {Paper size is ISO A4}}
+test indexObj-7.10 {Tcl_ParseArgsObjv} {testparseargs knownBug} {
+ testparseargs -media A4 -color Somecolor
+} {0 1 testparseargs Somecolor {Paper size is ISO A4}}
+test indexObj-7.11 {Tcl_ParseArgsObjv} {testparseargs knownBug} {
+ testparseargs -color othercolor -media Letter
+} {0 1 testparseargs othercolor {Paper size is US Letter}}
+test indexObj-7.12 {Tcl_ParseArgsObjv} -constraints testparseargs -body {
+ testparseargs -color othercolor -media Nosuchmedia
+} -returnCodes error -result {bad media "Nosuchmedia": must be A4, Legal, or Letter}
+
# cleanup
::tcltest::cleanupTests
return