summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-04-04 20:27:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-04-04 20:27:05 (GMT)
commit135dbc82bcd192e73bc436fd845ad0ff34b0a579 (patch)
tree0f96b74c63f4945ebf38344226d2b865a5dc5840 /tests
parenta77dbf237f91b1bf832c042ea9f376c7e707f9b1 (diff)
parent236e3e1beace12620e71c3bc5abb2616d69c1f07 (diff)
downloadtcl-135dbc82bcd192e73bc436fd845ad0ff34b0a579.zip
tcl-135dbc82bcd192e73bc436fd845ad0ff34b0a579.tar.gz
tcl-135dbc82bcd192e73bc436fd845ad0ff34b0a579.tar.bz2
Add testcases for bug [7cb7409e05]: Tcl_ParseArgsObjv bug with TCL_ARGV_GENFUNC. Mark failing testcases with "knownBug"
Diffstat (limited to 'tests')
-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