diff options
author | Steve Bennett <steveb@workware.net.au> | 2020-12-20 08:58:50 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2020-12-26 18:08:29 +1000 |
commit | 058a5ef8474fb62f711d53e2fc8e2fa68fbb8996 (patch) | |
tree | 4b36cb4c1c12451a4d716b555c21437caffcd487 /tcltest.tcl | |
parent | 3627155c4a047bc491d45406b22a9038402ae964 (diff) | |
download | jimtcl-058a5ef8474fb62f711d53e2fc8e2fa68fbb8996.zip jimtcl-058a5ef8474fb62f711d53e2fc8e2fa68fbb8996.tar.gz jimtcl-058a5ef8474fb62f711d53e2fc8e2fa68fbb8996.tar.bz2 |
core: commands that take an index now use integer expressions
This means that instead of just [list index 2+1], we can now do
[list index end-$n*2+1]
This applies to:
lindex, linsert, lreplace, lset, lrange, lsort, regexp, regsub
string index,first,last,range
Also add tests for both direct integer expressions and indexes.
Still needs doc update.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tcltest.tcl')
-rw-r--r-- | tcltest.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tcltest.tcl b/tcltest.tcl index f93a35b..a95f665 100644 --- a/tcltest.tcl +++ b/tcltest.tcl @@ -152,7 +152,7 @@ if {![exists -proc puts]} { proc script_source {script} { lassign [info source $script] f l if {$f ne ""} { - puts "At : $f:$l" + puts "$f:$l:Error test failure" return \t$f:$l } } @@ -160,7 +160,7 @@ proc script_source {script} { proc error_source {} { lassign [info stacktrace] p f l if {$f ne ""} { - puts "At : $f:$l" + puts "$f:$l:Error test failure" return \t$f:$l } } |