summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2010-10-02 16:51:40 (GMT)
committerKevin B Kenny <kennykb@acm.org>2010-10-02 16:51:40 (GMT)
commit571863bdcf20b914cd9320617621672f3a691a3a (patch)
treed946038bd3684c281b5dc824e92f51452830f12d /tests
parent53c93358cf3e60f1bf7b3d5756836d961007213f (diff)
downloadtcl-571863bdcf20b914cd9320617621672f3a691a3a.zip
tcl-571863bdcf20b914cd9320617621672f3a691a3a.tar.gz
tcl-571863bdcf20b914cd9320617621672f3a691a3a.tar.bz2
nop and regexp
Diffstat (limited to 'tests')
-rw-r--r--tests/assemble.test69
1 files changed, 69 insertions, 0 deletions
diff --git a/tests/assemble.test b/tests/assemble.test
index 79ac9e2..36afe80 100644
--- a/tests/assemble.test
+++ b/tests/assemble.test
@@ -843,6 +843,13 @@ test assemble-7.45 {listNotIn} {
-result 1
}
+test assemble-7.46 {nop} {
+ -body {
+ assemble { push x; nop; nop; nop}
+ }
+ -result x
+}
+
# assemble-8 ASSEM_LVT and FindLocalVar
test assemble-8.1 {load, wrong # args} {
@@ -2920,6 +2927,68 @@ test assemble-28.6 {dictIncrImm} {
-cleanup {rename x {}}
}
+# assemble-29 - ASSEM_REGEXP
+
+test assemble-29.1 {regexp - wrong # args} {
+ -body {
+ assemble {regexp}
+ }
+ -returnCodes error
+ -match glob
+ -result {wrong # args*}
+}
+
+test assemble-29.2 {regexp - wrong # args} {
+ -body {
+ assemble {regexp too many}
+ }
+ -returnCodes error
+ -match glob
+ -result {wrong # args*}
+}
+
+test assemble-29.3 {regexp - bad subst} {
+ -body {
+ assemble {regexp $foo}
+ }
+ -returnCodes error
+ -match glob
+ -result {assembly code may not contain substitutions}
+}
+
+test assemble-29.4 {regexp - not a boolean} {
+ -body {
+ proc x {} {
+ assemble {regexp rubbish}
+ }
+ x
+ }
+ -returnCodes error
+ -result {expected boolean value but got "rubbish"}
+ -cleanup {rename x {}}
+}
+
+test assemble-29.5 {regexp} {
+ -body {
+ assemble {push br.*br; push abracadabra; regexp false}
+ }
+ -result 1
+}
+
+test assemble-29.6 {regexp} {
+ -body {
+ assemble {push br.*br; push aBRacadabra; regexp false}
+ }
+ -result 0
+}
+
+test assemble-29.7 {regexp} {
+ -body {
+ assemble {push br.*br; push aBRacadabra; regexp true}
+ }
+ -result 1
+}
+
test assemble-30.1 {unbalanced stack} {
-body {
list \