From efe50f934b8c29cb84509a728e356586753282d8 Mon Sep 17 00:00:00 2001 From: "Sunrin SHIMURA (keen)" <3han5chou7@gmail.com> Date: Mon, 28 Dec 2015 12:03:29 +0900 Subject: [PATCH] add regression test against #312 --- t/issue/312.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 t/issue/312.scm diff --git a/t/issue/312.scm b/t/issue/312.scm new file mode 100644 index 00000000..ac0c1978 --- /dev/null +++ b/t/issue/312.scm @@ -0,0 +1,19 @@ +(import (scheme base) + (picrin test)) + +(test-begin) +(test #f (equal? (make-list 10 1) (make-list 11 1))) + +(let ((l1 (list 1 1)) + (l2 (list 1 1)) + (l3 (list 1 1 1))) + (set-cdr! l1 l1) + (set-cdr! l2 l2) + (set-cdr! (cdr l3) l3) + + (test #f (equal? l1 (make-list 10 1))) + (test #t (equal? l1 l1)) + (test #t (equal? l1 l2)) + (test #t (equal? l1 l3))) + +(test-end)