summaryrefslogtreecommitdiffstats
path: root/contrib/tcl/tests/lrange.test
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-07-25 19:27:55 +0000
committerphk <phk@FreeBSD.org>1997-07-25 19:27:55 +0000
commit30db38624722a51670556ef9b2dd7ccf4fb57387 (patch)
treed2f88b3e9ffa79ffb2cc1a0699dd3ee96c47c3e5 /contrib/tcl/tests/lrange.test
parent4170733a21f58ada18a6760af477926f494b5b67 (diff)
downloadFreeBSD-src-30db38624722a51670556ef9b2dd7ccf4fb57387.zip
FreeBSD-src-30db38624722a51670556ef9b2dd7ccf4fb57387.tar.gz
Import TCL release 8.0 beta 2.
Diffstat (limited to 'contrib/tcl/tests/lrange.test')
-rw-r--r--contrib/tcl/tests/lrange.test13
1 files changed, 8 insertions, 5 deletions
diff --git a/contrib/tcl/tests/lrange.test b/contrib/tcl/tests/lrange.test
index 91f4439..32fbbaa 100644
--- a/contrib/tcl/tests/lrange.test
+++ b/contrib/tcl/tests/lrange.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# SCCS: @(#) lrange.test 1.6 96/07/10 17:16:47
+# SCCS: @(#) lrange.test 1.12 97/06/23 18:19:25
if {[string compare test [info procs test]] == 1} then {source defs}
@@ -43,7 +43,7 @@ test lrange-1.9 {range of list elements} {
} {a b c d e}
test lrange-1.10 {range of list elements} {
lrange "a b\{c d" 1 2
-} "b\{c d"
+} "b\\{c d"
test lrange-1.11 {range of list elements} {
lrange "a b c d" end end
} d
@@ -56,9 +56,12 @@ test lrange-1.13 {range of list elements} {
test lrange-1.14 {range of list elements} {
lrange "a b c d" end 2
} {}
-test lrange-1.14 {range of list elements} {
+test lrange-1.15 {range of list elements} {
concat \"[lrange {a b \{\ } 0 2]"
} {"a b \{\ "}
+test lrange-1.16 {list element quoting} {
+ lrange {[append a .b]} 0 end
+} {{[append} a .b\]}
test lrange-2.1 {error conditions} {
list [catch {lrange a b} msg] $msg
@@ -68,10 +71,10 @@ test lrange-2.2 {error conditions} {
} {1 {wrong # args: should be "lrange list first last"}}
test lrange-2.3 {error conditions} {
list [catch {lrange a b 6} msg] $msg
-} {1 {expected integer but got "b"}}
+} {1 {bad index "b": must be integer or "end"}}
test lrange-2.4 {error conditions} {
list [catch {lrange a 0 enigma} msg] $msg
-} {1 {expected integer or "end" but got "enigma"}}
+} {1 {bad index "enigma": must be integer or "end"}}
test lrange-2.5 {error conditions} {
list [catch {lrange "a \{b c" 3 4} msg] $msg
} {1 {unmatched open brace in list}}
OpenPOWER on IntegriCloud