summaryrefslogtreecommitdiffstats
path: root/tests/lpop.test
diff options
context:
space:
mode:
authorpspjuth <peter.spjuth@gmail.com>2018-10-24 22:15:50 (GMT)
committerpspjuth <peter.spjuth@gmail.com>2018-10-24 22:15:50 (GMT)
commit63802cdd705ae32157c199f729c6ee2e61501e6e (patch)
tree05cf290836d31e0117b9d3bfe8db5096969cdf8f /tests/lpop.test
parent36f2cb4d7dbd7c8008161479f97985026e060e9e (diff)
downloadtcl-63802cdd705ae32157c199f729c6ee2e61501e6e.zip
tcl-63802cdd705ae32157c199f729c6ee2e61501e6e.tar.gz
tcl-63802cdd705ae32157c199f729c6ee2e61501e6e.tar.bz2
Simplify to only accept index arguemnts. No index list.
Added manual page.
Diffstat (limited to 'tests/lpop.test')
-rw-r--r--tests/lpop.test14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/lpop.test b/tests/lpop.test
index 7f0c6a8..089299b 100644
--- a/tests/lpop.test
+++ b/tests/lpop.test
@@ -41,11 +41,15 @@ test lpop-1.6 {error conditions} -returnCodes error -body {
test lpop-1.7 {error conditions} -returnCodes error -body {
set no "x y"
lpop no {}
-} -result {list index out of range}
+} -match glob -result {bad index *}
test lpop-1.8 {error conditions} -returnCodes error -body {
set no "x y"
- lpop no {0 0 0 0 1}
+ lpop no 0 0 0 0 1
} -result {list index out of range}
+test lpop-1.9 {error conditions} -returnCodes error -body {
+ set no "x y"
+ lpop no {1 0}
+} -match glob -result {bad index *}
test lpop-2.1 {basic functionality} -body {
set l "x y z"
@@ -68,15 +72,15 @@ test lpop-2.4 {basic functionality} -body {
test lpop-3.1 {nested} -body {
set l "x y"
set l2 $l
- list [lpop l {0 0 0 0}] $l $l2
+ list [lpop l 0 0 0 0] $l $l2
} -result {x {{{{}}} y} {x y}}
test lpop-3.2 {nested} -body {
set l "{x y} {a b}"
- list [lpop l {0 1}] $l
+ list [lpop l 0 1] $l
} -result {y {x {a b}}}
test lpop-3.3 {nested} -body {
set l "{x y} {a b}"
- list [lpop l {1 0}] $l
+ list [lpop l 1 0] $l
} -result {a {{x y} b}}