diff options
Diffstat (limited to 'tests/parse.test')
-rw-r--r-- | tests/parse.test | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/tests/parse.test b/tests/parse.test index 7ab0f01..1a2f3a3 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: parse.test,v 1.25 2006/10/09 19:15:45 msofer Exp $ +# RCS: @(#) $Id: parse.test,v 1.26 2006/11/03 00:34:53 hobbs Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -154,75 +154,75 @@ test parse-5.10 {Tcl_ParseCommand procedure, multiple deletion of non-static buf invoked from within \"testparser \"a \\\"\\\\1\\\\2\\\\3\\\\4\\\\5\\\\6\\\\7\\\\8\\\\9\\\\1\\\\2\\\\3\\\\4\\\\5\\\\6\\\\7\\\\8\" 0\"}" -test parse-5.11 {Tcl_ParseCommand: {expand} parsing} testparser { +test parse-5.11 {Tcl_ParseCommand: {*} parsing} testparser { testparser {{expan}} 0 } {- {{expan}} 1 simple {{expan}} 1 text expan 0 {}} -test parse-5.12 {Tcl_ParseCommand: {expand} parsing} -constraints { +test parse-5.12 {Tcl_ParseCommand: {*} parsing} -constraints { testparser } -body { testparser {{expan}x} 0 } -returnCodes error -result {extra characters after close-brace} -test parse-5.13 {Tcl_ParseCommand: {expand} parsing} testparser { - testparser {{expandy}} 0 -} {- {{expandy}} 1 simple {{expandy}} 1 text expandy 0 {}} -test parse-5.14 {Tcl_ParseCommand: {expand} parsing} -constraints { +test parse-5.13 {Tcl_ParseCommand: {*} parsing} testparser { + testparser {{**}} 0 +} {- {{**}} 1 simple {{**}} 1 text ** 0 {}} +test parse-5.14 {Tcl_ParseCommand: {*} parsing} -constraints { testparser } -body { - testparser {{expandy}x} 0 + testparser {{**}x} 0 } -returnCodes error -result {extra characters after close-brace} -test parse-5.15 {Tcl_ParseCommand: {expand} parsing} -constraints { +test parse-5.15 {Tcl_ParseCommand: {*} parsing} -constraints { testparser } -body { - testparser {{expand}{123456}x} 0 + testparser {{*}{123456}x} 0 } -returnCodes error -result {extra characters after close-brace} -test parse-5.16 {Tcl_ParseCommand: {expand} parsing} testparser { +test parse-5.16 {Tcl_ParseCommand: {*} parsing} testparser { testparser {{123456\ }} 0 } {- {{123456 }} 1 simple {{123456 }} 1 text {123456 } 0 {}} -test parse-5.17 {Tcl_ParseCommand: {expand} parsing} -constraints { +test parse-5.17 {Tcl_ParseCommand: {*} parsing} -constraints { testparser } -body { testparser {{123456\ }x} 0 } -returnCodes error -result {extra characters after close-brace} -test parse-5.18 {Tcl_ParseCommand: {expand} parsing} testparser { - testparser {{expand\ +test parse-5.18 {Tcl_ParseCommand: {*} parsing} testparser { + testparser {{*\ }} 0 -} {- {{expand }} 1 simple {{expand }} 1 text {expand } 0 {}} -test parse-5.19 {Tcl_ParseCommand: {expand} parsing} -constraints { +} {- {{* }} 1 simple {{* }} 1 text {* } 0 {}} +test parse-5.19 {Tcl_ParseCommand: {*} parsing} -constraints { testparser } -body { - testparser {{expand\ + testparser {{*\ }x} 0 } -returnCodes error -result {extra characters after close-brace} -test parse-5.20 {Tcl_ParseCommand: {expand} parsing} testparser { +test parse-5.20 {Tcl_ParseCommand: {*} parsing} testparser { testparser {{123456}} 0 } {- {{123456}} 1 simple {{123456}} 1 text 123456 0 {}} -test parse-5.21 {Tcl_ParseCommand: {expand} parsing} -constraints { +test parse-5.21 {Tcl_ParseCommand: {*} parsing} -constraints { testparser } -body { testparser {{123456}x} 0 } -returnCodes error -result {extra characters after close-brace} -test parse-5.22 {Tcl_ParseCommand: {expand} parsing} testparser { - testparser {{expand}} 0 -} {- {{expand}} 1 simple {{expand}} 1 text expand 0 {}} -test parse-5.23 {Tcl_ParseCommand: {expand} parsing} testparser { - testparser {{expand} } 0 -} {- {{expand} } 1 simple {{expand}} 1 text expand 0 {}} -test parse-5.24 {Tcl_ParseCommand: {expand} parsing} testparser { - testparser {{expand}x} 0 -} {- {{expand}x} 1 expand {{expand}x} 1 text x 0 {}} -test parse-5.25 {Tcl_ParseCommand: {expand} parsing} testparser { - testparser {{expand} +test parse-5.22 {Tcl_ParseCommand: {*} parsing} testparser { + testparser {{*}} 0 +} {- {{*}} 1 simple {{*}} 1 text * 0 {}} +test parse-5.23 {Tcl_ParseCommand: {*} parsing} testparser { + testparser {{*} } 0 +} {- {{*} } 1 simple {{*}} 1 text * 0 {}} +test parse-5.24 {Tcl_ParseCommand: {*} parsing} testparser { + testparser {{*}x} 0 +} {- {{*}x} 1 expand {{*}x} 1 text x 0 {}} +test parse-5.25 {Tcl_ParseCommand: {*} parsing} testparser { + testparser {{*} } 0 -} {- {{expand} -} 1 simple {{expand}} 1 text expand 0 {}} -test parse-5.26 {Tcl_ParseCommand: {expand} parsing} testparser { - testparser {{expand};} 0 -} {- {{expand};} 1 simple {{expand}} 1 text expand 0 {}} -test parse-5.27 {Tcl_ParseCommand: {expand} parsing} testparser { - testparser "{expand}\\\n foo bar" 0 -} {- \{expand\}\\\n\ foo\ bar 3 simple {{expand}} 1 text expand 0 simple foo 1 text foo 0 simple bar 1 text bar 0 {}} +} {- {{*} +} 1 simple {{*}} 1 text * 0 {}} +test parse-5.26 {Tcl_ParseCommand: {*} parsing} testparser { + testparser {{*};} 0 +} {- {{*};} 1 simple {{*}} 1 text * 0 {}} +test parse-5.27 {Tcl_ParseCommand: {*} parsing} testparser { + testparser "{*}\\\n foo bar" 0 +} {- \{*\}\\\n\ foo\ bar 3 simple {{*}} 1 text * 0 simple foo 1 text foo 0 simple bar 1 text bar 0 {}} test parse-6.1 {ParseTokens procedure, empty word} testparser { testparser {""} 0 |