diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-13 11:12:33 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-13 11:12:33 (GMT) |
commit | 49b167a3881644c6aee6b73d87e4edd13a50ce29 (patch) | |
tree | 11420ba578fd34a689a9c3cfc8e0c0d542107c8c /tests | |
parent | 2ded4dcac55bd18c10ff2815a4dc742bf18f70a0 (diff) | |
parent | f7550ff059c94a5139b1387ed8cf2e02072d743f (diff) | |
download | tcl-49b167a3881644c6aee6b73d87e4edd13a50ce29.zip tcl-49b167a3881644c6aee6b73d87e4edd13a50ce29.tar.gz tcl-49b167a3881644c6aee6b73d87e4edd13a50ce29.tar.bz2 |
Merge 8.7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/assemble.test | 80 | ||||
-rw-r--r-- | tests/binary.test | 12 |
2 files changed, 39 insertions, 53 deletions
diff --git a/tests/assemble.test b/tests/assemble.test index 8c50500..d417d4b 100644 --- a/tests/assemble.test +++ b/tests/assemble.test @@ -1524,61 +1524,35 @@ test assemble-14.7 {incrArrayStkImm} { # assemble-15 - listIndexImm -test assemble-15.1 {listIndexImm - wrong # args} { - -body { - assemble {listIndexImm} - } - -returnCodes error - -match glob - -result {wrong # args*} -} -test assemble-15.2 {listIndexImm - wrong # args} { - -body { - assemble {listIndexImm too many} - } - -returnCodes error - -match glob - -result {wrong # args*} -} -test assemble-15.3 {listIndexImm - bad substitution} { - -body { - list [catch {assemble {listIndexImm $foo}} result] $result $::errorCode - } - -result {1 {assembly code may not contain substitutions} {TCL ASSEM NOSUBST}} - -cleanup {unset result} -} -test assemble-15.4 {listIndexImm - invalid index} { - -body { - assemble {listIndexImm rubbish} - } - -returnCodes error - -match glob - -result {bad index "rubbish"*} -} -test assemble-15.5 {listIndexImm} { - -body { - assemble {push {a b c}; listIndexImm 2} - } - -result c -} -test assemble-15.6 {listIndexImm} { - -body { - assemble {push {a b c}; listIndexImm end-1} - } - -result b -} -test assemble-15.7 {listIndexImm} { - -body { - assemble {push {a b c}; listIndexImm end} - } - -result c -} -test assemble-15.8 {listIndexImm} { +test assemble-15.1 {listIndexImm - wrong # args} -body { + assemble {listIndexImm} +} -returnCodes error -match glob -result {wrong # args*} +test assemble-15.2 {listIndexImm - wrong # args} -body { + assemble {listIndexImm too many} +} -returnCodes error -match glob -result {wrong # args*} +test assemble-15.3 {listIndexImm - bad substitution} -body { + list [catch {assemble {listIndexImm $foo}} result] $result $::errorCode +} -cleanup { + unset result +} -result {1 {assembly code may not contain substitutions} {TCL ASSEM NOSUBST}} +test assemble-15.4 {listIndexImm - invalid index} -body { + assemble {listIndexImm rubbish} +} -returnCodes error -match glob -result {bad index "rubbish"*} +test assemble-15.5 {listIndexImm} -body { + assemble {push {a b c}; listIndexImm 2} +} -result c +test assemble-15.6 {listIndexImm} -body { + assemble {push {a b c}; listIndexImm end-1} +} -result b +test assemble-15.7 {listIndexImm} -body { + assemble {push {a b c}; listIndexImm end} +} -result c +test assemble-15.8 {listIndexImm} -body { assemble {push {a b c}; listIndexImm end+2} -} {} -test assemble-15.9 {listIndexImm} { +} -result {} +test assemble-15.9 {listIndexImm} -body { assemble {push {a b c}; listIndexImm -1-1} -} {} +} -result {} # assemble-16 - invokeStk diff --git a/tests/binary.test b/tests/binary.test index 973240f..8b5ad18 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -2918,6 +2918,18 @@ test binary-78.1 {unicode (out of BMP) to byte-array conversion, bug-[bd94500678 set str {} } -result {} + +testConstraint testsetbytearraylength \ + [expr {"testsetbytearraylength" in [info commands]}] + +test binary-79.1 {Tcl_SetByteArrayLength} testsetbytearraylength { + testsetbytearraylength [string cat A B C] 1 +} A +test binary-79.2 {Tcl_SetByteArrayLength} testsetbytearraylength { + testsetbytearraylength [string cat \u0141 B C] 1 +} A + + # ---------------------------------------------------------------------- # cleanup |