summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-12-16 00:09:39 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-12-16 00:12:57 +0100
commita68ffccdccc9023c1beb14cae2a8d2695e517da0 (patch)
tree36bc33fd21484f8e0e6b820df69775cfe2d79e2e /tests
parent8be1e42cfbf9e3bc9d64dc839969d4b4293afb53 (diff)
downloadmew-a68ffccdccc9023c1beb14cae2a8d2695e517da0.tar.gz
mew-a68ffccdccc9023c1beb14cae2a8d2695e517da0.tar.xz
mew-a68ffccdccc9023c1beb14cae2a8d2695e517da0.zip
add dup
Diffstat (limited to 'tests')
-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))))