summary refs log tree commit diff
path: root/tests/test.mew
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.mew')
-rw-r--r--tests/test.mew10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test.mew b/tests/test.mew
index a775928..cbcf2ff 100644
--- a/tests/test.mew
+++ b/tests/test.mew
@@ -377,6 +377,16 @@
   (test-error (len #t)))
 
 ; for
+(test-group "dup"
+  (let* ((x (list (list "foo") "bar"))
+         (y1 (dup x))
+         (y2 (dup x 1))
+         (y3 (dup x 2)))
+    (test #f (eq? (car x) (car y1)))
+    (test #t (eq? (car x) (car y2)))
+    (test #f (eq? (car x) (car y3)))
+    (test #t (eq? (caar x) (caar y3)))))
+
 
 (test-group "eof"
   (test-assert (eof-object? (eof))))