From: Taylor R Campbell Date: Sat, 23 Feb 2019 03:16:30 +0000 (+0000) Subject: Test append on dotted lists. I broked it. X-Git-Tag: mit-scheme-pucked-10.1.11~6^2~37 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=79025a7087ab690946339ea58ef8cb1f19e5de57;p=mit-scheme.git Test append on dotted lists. I broked it. --- diff --git a/tests/runtime/test-list.scm b/tests/runtime/test-list.scm index 8fe5c174d..22120405b 100644 --- a/tests/runtime/test-list.scm +++ b/tests/runtime/test-list.scm @@ -36,6 +36,22 @@ USA. (let ((n-bytes (- stack-end stack-start))) (quotient n-bytes bytes-per-word))))) +(define-test 'append-dotted + (lambda () + (assert-equal (append 'x) 'x) + (assert-equal (append '(x) 'y) '(x . y)) + (expect-error + (lambda () + (assert-equal (append '(x) '(y) 'z) '(x y . z)))))) + +(define-test 'append!-dotted + (lambda () + (assert-equal (append! 'x) 'x) + (assert-equal (append! (list 'x) 'y) '(x . y)) + (expect-error + (lambda () + (assert-equal (append! (list 'x) (list 'y) 'z) '(x y . z)))))) + (define-test 'map-long (lambda () (let* ((n (words-in-stack))