summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-11-03 20:44:43 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-11-03 20:44:43 +0100
commit121afda5a559ed39c42060697fe39e736e3383d9 (patch)
tree7e8de1f889d18bdc95e5dcaac69fd5dbb054c11e /tests
parent94846eb7cf636276d7f177dc54387162d2593812 (diff)
downloadmew-121afda5a559ed39c42060697fe39e736e3383d9.tar.gz
mew-121afda5a559ed39c42060697fe39e736e3383d9.tar.xz
mew-121afda5a559ed39c42060697fe39e736e3383d9.zip
reimplement range to allow negative step
Diffstat (limited to 'tests')
-rw-r--r--tests/test.mew5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test.mew b/tests/test.mew
index 311db5a..82c793a 100644
--- a/tests/test.mew
+++ b/tests/test.mew
@@ -28,7 +28,10 @@
   (test '() (into '() (range 4 1)))
   (test '(1 3 5) (into '() (range 1 6 2)))
   (test '(1 3 5) (into '() (range 1 7 2)))
-  (test '(2 3 4) (into '() (gtake (range 2) 3))))
+  (test '(3 2 1) (into '() (range 3 0 -1)))
+  (test '(2 3 4) (into '() (gtake (range 2) 3)))
+  (test '(1 3/2 2 5/2) (into '() (gtake (range 1 +inf.0 1/2) 4)))
+  (test '(1 1 1 1) (into '() (gtake (range 1 +inf.0 0) 4))))
 
 (test-group "cycle"
   (test '(1 2 3 1 2 3) (into '() (gtake (cycle 1 2 3) 6)))