Tcl Source Code

Check-in [ebc33b0d1d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Test for Bug 1884496 (not buggy on trunk).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ebc33b0d1db720da8a942d74fc3397936821b256
User & Date: dgp 2013-01-11 17:27:38
Context
2013-01-12
21:57
Put back TclBackgroundException in internal stub table, so extensions using this, compiled against 8... check-in: 10413f8ec8 user: jan.nijtmans tags: trunk
2013-01-11
23:29
merge trunk check-in: 8fc1e382f6 user: mig tags: ISC-peephole
17:33
merge trunk check-in: af6f7ab078 user: dgp tags: dgp-refactor
17:27
Test for Bug 1884496 (not buggy on trunk). check-in: ebc33b0d1d user: dgp tags: trunk
12:42
Name functions according to 'what' instead of 'how' in the [tailcall] machinery, in view of making p... check-in: 436a4cdd32 user: mig tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/parse.test.

22
23
24
25
26
27
28

29
30
31
32
33
34
35
testConstraint testparser [llength [info commands testparser]]
testConstraint testevalobjv [llength [info commands testevalobjv]]
testConstraint testevalex [llength [info commands testevalex]]
testConstraint testparsevarname [llength [info commands testparsevarname]]
testConstraint testparsevar [llength [info commands testparsevar]]
testConstraint testasync [llength [info commands testasync]]
testConstraint testcmdtrace [llength [info commands testcmdtrace]]


test parse-1.1 {Tcl_ParseCommand procedure, computing string length} testparser {
    testparser [bytestring "foo\0 bar"] -1
} {- foo 1 simple foo 1 text foo 0 {}}
test parse-1.2 {Tcl_ParseCommand procedure, computing string length} testparser {
    testparser "foo bar" -1
} {- {foo bar} 2 simple foo 1 text foo 0 simple bar 1 text bar 0 {}}







>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
testConstraint testparser [llength [info commands testparser]]
testConstraint testevalobjv [llength [info commands testevalobjv]]
testConstraint testevalex [llength [info commands testevalex]]
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
} {- foo 1 simple foo 1 text foo 0 {}}
test parse-1.2 {Tcl_ParseCommand procedure, computing string length} testparser {
    testparser "foo bar" -1
} {- {foo bar} 2 simple foo 1 text foo 0 simple bar 1 text bar 0 {}}
1085
1086
1087
1088
1089
1090
1091








1092
1093
1094
1095
1096
1097
} {- {\x1} 1 word {\x1} 1 backslash {\x1} 0 2X}
test parse-20.11 {TclParseBackslash: truncated escape} testparser {
    testparser {\x12X} 4
} {- {\x12} 1 word {\x12} 1 backslash {\x12} 0 X}
test parse-20.12 {TclParseBackslash: truncated escape} testparser {
    testparser {\x12X} 5
} {- {\x12X} 1 word {\x12X} 2 backslash {\x12} 0 text X 0 {}}









cleanupTests
}

namespace delete ::tcl::test::parse
return







>
>
>
>
>
>
>
>






1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
} {- {\x1} 1 word {\x1} 1 backslash {\x1} 0 2X}
test parse-20.11 {TclParseBackslash: truncated escape} testparser {
    testparser {\x12X} 4
} {- {\x12} 1 word {\x12} 1 backslash {\x12} 0 X}
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
}

namespace delete ::tcl::test::parse
return