diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-24 08:43:28 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-24 08:43:28 (GMT) |
commit | 5183eb3389df23bfd5f5c85b2a5836e3a010352f (patch) | |
tree | 2c5acd09471657ee1ac113fd6457c68524e36166 /tests | |
parent | 2dee9266c17cee827634f64f672076ff6f318342 (diff) | |
parent | 5c8ce61f7963bdd41e0d7c9d18a7b4e5f918eb35 (diff) | |
download | tcl-5183eb3389df23bfd5f5c85b2a5836e3a010352f.zip tcl-5183eb3389df23bfd5f5c85b2a5836e3a010352f.tar.gz tcl-5183eb3389df23bfd5f5c85b2a5836e3a010352f.tar.bz2 |
Merge 8.7. Change more functions signatures to return the Tcl full version number.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/expr.test | 6 | ||||
-rw-r--r-- | tests/interp.test | 4 | ||||
-rw-r--r-- | tests/reg.test | 4 | ||||
-rw-r--r-- | tests/string.test | 45 |
4 files changed, 57 insertions, 2 deletions
diff --git a/tests/expr.test b/tests/expr.test index 9add1f1..8d2f668 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -6699,6 +6699,12 @@ test expr-38.12 {abs and -0x0 [Bug 2954959]} { test expr-38.13 {abs and 0.0 [Bug 2954959]} { ::tcl::mathfunc::abs 1e-324 } 1e-324 +test expr-38.14 {abs and INT64_MIN special-case} { + ::tcl::mathfunc::abs -9223372036854775808 +} 9223372036854775808 +test expr-38.15 {abs and INT128_MIN special-case} { + ::tcl::mathfunc::abs -170141183460469231731687303715884105728 +} 170141183460469231731687303715884105728 testConstraint testexprlongobj [llength [info commands testexprlongobj]] testConstraint testexprdoubleobj [llength [info commands testexprdoubleobj]] diff --git a/tests/interp.test b/tests/interp.test index c19755f..385d3e2 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -3524,7 +3524,7 @@ test interp-35.19 {interp limit syntax} -body { interp limit $i time -seconds -1 } -cleanup { interp delete $i -} -returnCodes error -result {seconds must be at least 0} +} -match glob -returnCodes error -result {seconds must be between 0 and *} test interp-35.20 {interp limit syntax} -body { set i [interp create] interp limit $i time -millis foobar @@ -3536,7 +3536,7 @@ test interp-35.21 {interp limit syntax} -body { interp limit $i time -millis -1 } -cleanup { interp delete $i -} -returnCodes error -result {milliseconds must be at least 0} +} -match glob -returnCodes error -result {milliseconds must be between 0 and *} test interp-35.22 {interp time limits normalize milliseconds} -body { set i [interp create] interp limit $i time -seconds 1 -millis 1500 diff --git a/tests/reg.test b/tests/reg.test index 3c9020d..5ebc2f9 100644 --- a/tests/reg.test +++ b/tests/reg.test @@ -1221,6 +1221,10 @@ test reg-33.29 {} { test reg-33.30 {Bug 1080042} { regexp {(\Y)+} foo } 1 +test reg-33.31 {Bug 7c64aa5e1a} { + regexp -inline {(?b).\{1,10\}} {abcdef} +} abcdef + # cleanup ::tcltest::cleanupTests diff --git a/tests/string.test b/tests/string.test index 3775c0d..0eaa3da 100644 --- a/tests/string.test +++ b/tests/string.test @@ -1897,6 +1897,33 @@ test string-21.15.$noComp {string wordend, unicode} -body { test string-21.16.$noComp {string wordend, unicode} -constraints utf16 -body { run {string wordend "\U1D7CA\U1D7CA abc" 10} } -result 8 +test string-21.17.$noComp {string trim, unicode} { + run {string trim "\uD83D\uDE02Hello world!\uD83D\uDE02" \uD83D\uDE02} +} "Hello world!" +test string-21.18.$noComp {string trimleft, unicode} { + run {string trimleft "\uD83D\uDE02Hello world!\uD83D\uDE02" \uD83D\uDE02} +} "Hello world!\uD83D\uDE02" +test string-21.19.$noComp {string trimright, unicode} { + run {string trimright "\uD83D\uDE02Hello world!\uD83D\uDE02" \uD83D\uDE02} +} "\uD83D\uDE02Hello world!" +test string-21.20.$noComp {string trim, unicode} { + run {string trim "\uF602Hello world!\uF602" \uD83D\uDE02} +} "\uF602Hello world!\uF602" +test string-21.21.$noComp {string trimleft, unicode} { + run {string trimleft "\uF602Hello world!\uF602" \uD83D\uDE02} +} "\uF602Hello world!\uF602" +test string-21.22.$noComp {string trimright, unicode} { + run {string trimright "\uF602Hello world!\uF602" \uD83D\uDE02} +} "\uF602Hello world!\uF602" +test string-21.23.$noComp {string trim, unicode} { + run {string trim "\uD83D\uDE02Hello world!\uD83D\uDE02" \uD93D\uDE02} +} "\uD83D\uDE02Hello world!\uD83D\uDE02" +test string-21.24.$noComp {string trimleft, unicode} { + run {string trimleft "\uD83D\uDE02Hello world!\uD83D\uDE02" \uD93D\uDE02} +} "\uD83D\uDE02Hello world!\uD83D\uDE02" +test string-21.25.$noComp {string trimright, unicode} { + run {string trimright "\uD83D\uDE02Hello world!\uD83D\uDE02" \uD93D\uDE02} +} "\uD83D\uDE02Hello world!\uD83D\uDE02" test string-22.1.$noComp {string wordstart} -body { list [catch {run {string word a}} msg] $msg @@ -2059,6 +2086,24 @@ test string-24.15.$noComp {string reverse command - pure bytearray} { binary scan [run {tcl::string::reverse [binary format H* 010203]}] H* x set x } 030201 +test string-24.16.$noComp {string reverse command - surrogates} { + run {string reverse \u0444bulb\uD83D\uDE02} +} \uD83D\uDE02blub\u0444 +test string-24.17.$noComp {string reverse command - surrogates} { + run {string reverse \uD83D\uDE02hello\uD83D\uDE02} +} \uD83D\uDE02olleh\uD83D\uDE02 +test string-24.18.$noComp {string reverse command - surrogates} { + set s \u0444bulb\uD83D\uDE02 + # shim shimmery ... + string index $s 0 + run {string reverse $s} +} \uD83D\uDE02blub\u0444 +test string-24.19.$noComp {string reverse command - surrogates} { + set s \uD83D\uDE02hello\uD83D\uDE02 + # shim shimmery ... + string index $s 0 + run {string reverse $s} +} \uD83D\uDE02olleh\uD83D\uDE02 test string-25.1.$noComp {string is list} { run {string is list {a b c}} |