summaryrefslogtreecommitdiffstats
path: root/tests/lreplace.test
diff options
context:
space:
mode:
authoraspect <aspect+tclcore@abstracted-spleen.org>2015-06-16 03:33:22 (GMT)
committeraspect <aspect+tclcore@abstracted-spleen.org>2015-06-16 03:33:22 (GMT)
commitca0957c060554b00bfdf17701723a79588030542 (patch)
treec0b64aac343be4fc0328ba0271d50098c1a0c316 /tests/lreplace.test
parentfb3057c4a82b8cead5f45c319b4256eb2f6c8dba (diff)
downloadtcl-ca0957c060554b00bfdf17701723a79588030542.zip
tcl-ca0957c060554b00bfdf17701723a79588030542.tar.gz
tcl-ca0957c060554b00bfdf17701723a79588030542.tar.bz2
lreplace: more tests, doc improvementaspect_lreplace_refix
Diffstat (limited to 'tests/lreplace.test')
-rw-r--r--tests/lreplace.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/lreplace.test b/tests/lreplace.test
index cf0ae51..ea88c07 100644
--- a/tests/lreplace.test
+++ b/tests/lreplace.test
@@ -149,6 +149,39 @@ test lreplace-4.5 {lreplace edge case} {
test lreplace-4.6 {lreplace end-x: bug a4cb3f06c4} {
lreplace {0 1 2 3 4} 0 end-2
} {3 4}
+test lreplace-4.6.1 {lreplace end-x: bug a4cb3f06c4} {
+ lreplace {0 1 2 3 4} 0 end-2 a b c
+} {a b c 3 4}
+test lreplace-4.7 {lreplace with two end-indexes: increasing} {
+ lreplace {0 1 2 3 4} end-2 end-1
+} {0 1 4}
+test lreplace-4.7.1 {lreplace with two end-indexes: increasing} {
+ lreplace {0 1 2 3 4} end-2 end-1 a b c
+} {0 1 a b c 4}
+test lreplace-4.8 {lreplace with two end-indexes: equal} {
+ lreplace {0 1 2 3 4} end-2 end-2
+} {0 1 3 4}
+test lreplace-4.8.1 {lreplace with two end-indexes: equal} {
+ lreplace {0 1 2 3 4} end-2 end-2 a b c
+} {0 1 a b c 3 4}
+test lreplace-4.9 {lreplace with two end-indexes: decreasing} {
+ lreplace {0 1 2 3 4} end-2 end-3
+} {0 1 2 3 4}
+test lreplace-4.9.1 {lreplace with two end-indexes: decreasing} {
+ lreplace {0 1 2 3 4} end-2 end-3 a b c
+} {0 1 a b c 2 3 4}
+test lreplace-4.10 {lreplace with two equal indexes} {
+ lreplace {0 1 2 3 4} 2 2
+} {0 1 3 4}
+test lreplace-4.10.1 {lreplace with two equal indexes} {
+ lreplace {0 1 2 3 4} 2 2 a b c
+} {0 1 a b c 3 4}
+test lreplace-4.11 {lreplace end index first} {
+ lreplace {0 1 2 3 4} end-2 1 a b c
+} {0 1 a b c 2 3 4}
+test lreplace-4.12 {lreplace end index first} {
+ lreplace {0 1 2 3 4} end-2 2 a b c
+} {0 1 a b c 3 4}
# cleanup
catch {unset foo}