diff options
Diffstat (limited to 'tests/parse.test')
-rw-r--r-- | tests/parse.test | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/tests/parse.test b/tests/parse.test index 37c44d5..bc4107d 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -16,6 +16,9 @@ if {[catch {package require tcltest 2.0.2}]} { namespace eval ::tcl::test::parse { namespace import ::tcltest::* +::tcltest::loadTestedCommands +catch [list package require -exact Tcltest [info patchlevel]] + testConstraint testparser [llength [info commands testparser]] testConstraint testevalobjv [llength [info commands testevalobjv]] testConstraint testevalex [llength [info commands testevalex]] @@ -23,6 +26,7 @@ testConstraint testparsevarname [llength [info commands testparsevarname]] testConstraint testparsevar [llength [info commands testparsevar]] testConstraint testasync [llength [info commands testasync]] testConstraint testcmdtrace [llength [info commands testcmdtrace]] +testConstraint testevent [llength [info commands testevent]] test parse-1.1 {Tcl_ParseCommand procedure, computing string length} testparser { testparser [bytestring "foo\0 bar"] -1 @@ -899,7 +903,7 @@ test parse-15.60 {CommandComplete procedure} { info complete \\\n } 0 -test parse-16.1 {Tcl_EvalEx, check termOffset is set correctly for non TCL_OK cases, bug 2535} { +test parse-16.1 {Bug 218885 (Scriptics bug 2535)} { subst {[eval {return foo}]bar} } foobar @@ -1035,32 +1039,19 @@ test parse-19.2 {Bug 1115904: recursion limit in Tcl_EvalEx} -constraints { interp create i load {} Tcltest i i eval {proc {} args {}} - interp recursionlimit i 3 + interp recursionlimit i 2 } -body { i eval {testevalex {[[]]}} } -cleanup { interp delete i } -returnCodes error -match glob -result {too many nested*} -test parse-19.3 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { - interp create i - i eval {proc {} args {}} - interp recursionlimit i 3 -} -body { - i eval {subst {[]}} -} -cleanup { - interp delete i -} - -test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} -setup { - interp create i - i eval {proc {} args {}} - interp recursionlimit i 3 -} -body { - i eval {subst {[[]]}} -} -cleanup { - interp delete i -} -returnCodes error -match glob -result {too many nested*} +test parse-19.3 {Bug 1115904: recursion limit in Tcl_EvalEx} emptyTest { + # Test no longer valid in Tcl 8.6 +} {} +test parse-19.4 {Bug 1115904: recursion limit in Tcl_EvalEx} emptyTest { + # Test no longer valid in Tcl 8.6 +} {} test parse-20.1 {TclParseBackslash: truncated escape} testparser { testparser {\u12345} 1 @@ -1100,6 +1091,14 @@ test parse-20.12 {TclParseBackslash: truncated escape} testparser { testparser {\x12X} 5 } {- {\x12X} 1 word {\x12X} 2 backslash {\x12} 0 text X 0 {}} +test parse-21.0 {Bug 1884496} testevent { + set ::script {set a [p]; return -level 0 $a} + proc ::p {} {string first s $::script} + testevent queue a head $::script + update +} {} + + cleanupTests } |