aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDanyil Bohdan <danyil.bohdan@gmail.com>2014-07-25 12:52:28 +0300
committerSteve Bennett <steveb@workware.net.au>2014-07-26 13:43:08 +1000
commita07760e95c68569b635ecc97465175d9a306ff37 (patch)
tree64c9a11283b68852aaf3a204df5dc8579ec910e5 /tests
parenteff89bbd45fce0af30d819718076a3d0890f6a5a (diff)
downloadjimtcl-a07760e95c68569b635ecc97465175d9a306ff37.zip
jimtcl-a07760e95c68569b635ecc97465175d9a306ff37.tar.gz
jimtcl-a07760e95c68569b635ecc97465175d9a306ff37.tar.bz2
jim.c: make lindex work as identity function.
Diffstat (limited to 'tests')
-rw-r--r--tests/jim.test10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/jim.test b/tests/jim.test
index c1ab8e7..c83a047 100644
--- a/tests/jim.test
+++ b/tests/jim.test
@@ -1539,9 +1539,9 @@ set minus -
# Tests of Tcl_LindexObjCmd, NOT COMPILED
-#test lindex-1.1 {wrong # args} {
-# list [catch {eval $lindex} result] $result
-#} "1 {wrong # args: should be \"lindex list ?index...?\"}"
+test lindex-1.1 {wrong # args} {
+ list [catch {eval $lindex} result] $result
+} "1 {wrong # args: should be \"lindex list ?index ...?\"}"
# Indices that are lists or convertible to lists
@@ -1834,6 +1834,10 @@ test lindex-16.3 {data reuse} {
set result
} {}
+test lindex-17.1 {no index} {
+ lindex {a b c}
+} {a b c}
+
catch { unset lindex}
catch { unset minus }