From a68ffccdccc9023c1beb14cae2a8d2695e517da0 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 16 Dec 2022 00:09:39 +0100 Subject: add dup --- tests/test.mew | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') 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)))) -- cgit 1.4.1