diff options
author | oharboe <oharboe> | 2008-11-05 06:44:02 +0000 |
---|---|---|
committer | oharboe <oharboe> | 2008-11-05 06:44:02 +0000 |
commit | db1bee85dfd4d3a25a6cf3bf46e2433b5a2dab39 (patch) | |
tree | 5e74a28061e309a2265d7862947515e0455c46ed | |
parent | 9c3d14ec05762aa0eecbbf074a1fabf40a0ce242 (diff) | |
download | jimtcl-db1bee85dfd4d3a25a6cf3bf46e2433b5a2dab39.zip jimtcl-db1bee85dfd4d3a25a6cf3bf46e2433b5a2dab39.tar.gz jimtcl-db1bee85dfd4d3a25a6cf3bf46e2433b5a2dab39.tar.bz2 |
2008-11-05 Steve Bennett <steveb@workware.net.au>
* jim.c: fix lazy expression evaluation with unary not
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ecos/language/tcl/jim/current/src/jim.c | 2 | ||||
-rw-r--r-- | jim.c | 2 | ||||
-rw-r--r-- | regtest.tcl | 23 |
4 files changed, 29 insertions, 2 deletions
@@ -1,3 +1,7 @@ +2008-11-05 Steve Bennett <steveb@workware.net.au> + + * jim.c: fix lazy expression evaluation with unary not + 2008-11-04 Steve Bennett <steveb@workware.net.au> * jim.c: fix problems with "puts [list ${a}]". Resulted in syntax diff --git a/ecos/language/tcl/jim/current/src/jim.c b/ecos/language/tcl/jim/current/src/jim.c index 3425561..79f846c 100644 --- a/ecos/language/tcl/jim/current/src/jim.c +++ b/ecos/language/tcl/jim/current/src/jim.c @@ -6618,7 +6618,7 @@ static void ExprMakeLazy(Jim_Interp *interp, ExprByteCode *expr) case JIM_EXPROP_STRING:
break;
default:
- op = JimExprOperatorInfoByOpcode(expr->opcode[i]);
+ op = JimExprOperatorInfoByOpcode(expr->opcode[leftindex]);
if (op == NULL) {
Jim_Panic(interp,"Default reached in ExprMakeLazy()");
}
@@ -6618,7 +6618,7 @@ static void ExprMakeLazy(Jim_Interp *interp, ExprByteCode *expr) case JIM_EXPROP_STRING: break; default: - op = JimExprOperatorInfoByOpcode(expr->opcode[i]); + op = JimExprOperatorInfoByOpcode(expr->opcode[leftindex]); if (op == NULL) { Jim_Panic(interp,"Default reached in ExprMakeLazy()"); } diff --git a/regtest.tcl b/regtest.tcl index a013e3e..8aba0b8 100644 --- a/regtest.tcl +++ b/regtest.tcl @@ -45,6 +45,29 @@ if {[catch {set thisvardoesnotexists}] == 0} { } puts "TEST 6 PASSED" +# REGTEST 7 +# 04Nov2008 - variable parsing does not eat last brace +set a 1 +list ${a} +puts "TEST 7 PASSED" + +# REGTEST 8 +# 04Nov2008 - string toupper/tolower do not convert to string rep +string tolower [list a] +string toupper [list a] +puts "TEST 8 PASSED" + +# REGTEST 9 +# 04Nov2008 - crash on exit when replacing Tcl proc with C command. Requires the aio extension +proc aio.open {args} {} +catch {package require aio} +# Note, crash on exit, so don't say we passed! + +# REGTEST 10 +# 05Nov2008 - incorrect lazy expression evaluation with unary not +expr {1 || !0} +puts "TEST 10 PASSED" + # TAKE THE FOLLOWING puts AS LAST LINE puts "--- ALL TESTS PASSED ---" |