diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-11-19 22:08:35 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-11-19 22:08:35 (GMT) |
commit | 094f23c172acca8f32b0888cd536f01fc1daab1b (patch) | |
tree | 9790caf5f3e563afb49a9b98f35fe6c8f92fb8df /tests/stringComp.test | |
parent | 2bf2abcb4f1c88fbddc3ce4d5800c438851aaf95 (diff) | |
download | tcl-094f23c172acca8f32b0888cd536f01fc1daab1b.zip tcl-094f23c172acca8f32b0888cd536f01fc1daab1b.tar.gz tcl-094f23c172acca8f32b0888cd536f01fc1daab1b.tar.bz2 |
[Bug 3588366]: Corrected implementation of bounds restriction for end-indexed
compiled [string range]. Thanks to Emiliano Gavilan for diagnosis and fix.
Diffstat (limited to 'tests/stringComp.test')
-rw-r--r-- | tests/stringComp.test | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/stringComp.test b/tests/stringComp.test index 56fb69d..9e00ce7 100644 --- a/tests/stringComp.test +++ b/tests/stringComp.test @@ -26,7 +26,7 @@ catch [list package require -exact Tcltest [info patchlevel]] # Some tests require the testobj command testConstraint testobj [expr {[info commands testobj] != {}}] - + test stringComp-1.1 {error conditions} { proc foo {} {string gorp a b} list [catch {foo} msg] $msg @@ -677,7 +677,11 @@ test stringComp-11.54 {string match, failure} { } {0 1 1 1 0 0} ## string range -## not yet bc +test stringComp-12.1 {Bug 3588366: end-offsets before start} { + apply {s { + string range $s 0 end-5 + }} 12345 +} {} ## string repeat ## not yet bc @@ -699,8 +703,12 @@ test stringComp-11.54 {string match, failure} { ## string word* ## not yet bc - + # cleanup catch {rename foo {}} ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: |