diff options
author | griffin <briang42@easystreet.net> | 2022-08-08 23:52:43 (GMT) |
---|---|---|
committer | griffin <briang42@easystreet.net> | 2022-08-08 23:52:43 (GMT) |
commit | 7561d600a6a9c4bf3e5e216b8220044f96bddf6e (patch) | |
tree | 0a562a015e828b5949c38f615d0686a6ed832d1a /tests/lseq.test | |
parent | 7030b2b274ec5a3c7f7a29b5549a28a9f9002a16 (diff) | |
download | tcl-7561d600a6a9c4bf3e5e216b8220044f96bddf6e.zip tcl-7561d600a6a9c4bf3e5e216b8220044f96bddf6e.tar.gz tcl-7561d600a6a9c4bf3e5e216b8220044f96bddf6e.tar.bz2 |
Add version number to AbstractList implementation. Make sure lsort and lreplace do not shimer their input argument.
Diffstat (limited to 'tests/lseq.test')
-rw-r--r-- | tests/lseq.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lseq.test b/tests/lseq.test index 06a2467..1d1923a 100644 --- a/tests/lseq.test +++ b/tests/lseq.test @@ -344,6 +344,21 @@ test lseq-3.25 {edge case} { llength [lseq 1 to 1 by 1] } {1} +test lseq-3.26 {lsort shimmer} arithSeriesShimmer { + set r [lseq 15 0] + set rep-before [lindex [tcl::unsupported::representation $r] 3] + set lexical_sort [lsort $r] + set rep-after [lindex [tcl::unsupported::representation $r] 3] + list ${rep-before} $lexical_sort ${rep-after} +} {arithseries {0 1 10 11 12 13 14 15 2 3 4 5 6 7 8 9} arithseries} + +test lseq-3.27 {lreplace shimmer} arithSeriesShimmer { + set r [lseq 15 0] + set rep-before [lindex [tcl::unsupported::representation $r] 3] + set lexical_sort [lreplace $r 3 5 A B C] + set rep-after [lindex [tcl::unsupported::representation $r] 3] + list ${rep-before} $lexical_sort ${rep-after} +} {arithseries {15 14 13 A B C 9 8 7 6 5 4 3 2 1 0} arithseries} # Test lmap # Test "in" expression operator @@ -352,6 +367,7 @@ test lseq-3.25 {edge case} { # Test lrange (lrange of a [lseq] list produces another [lseq] list) # Test start,end,step expressions # Test lreverse +# Test lsort shimmer # Test lsearch # Test array for # Test join for shimmer. |