From 74022ecc03dcdd1631867ac1c5e84c7943a8c8fc Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Mon, 11 Feb 2019 00:44:21 +0000 Subject: [PATCH] Confirm delv does not blow out the stack. --- tests/runtime/test-list.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/runtime/test-list.scm b/tests/runtime/test-list.scm index d3e86700a..438e723eb 100644 --- a/tests/runtime/test-list.scm +++ b/tests/runtime/test-list.scm @@ -148,4 +148,14 @@ USA. (list (length a) (length b)))) (lambda () 'overflow) (lambda () 'timeout)) - (list (quotient n 2) (quotient n 2)))))))) \ No newline at end of file + (list (quotient n 2) (quotient n 2)))))))) + +(define-test 'delv-long + (lambda () + (let* ((n (words-in-stack)) + (l (list-tabulate (* 2 n) (lambda (i) (remainder i 2))))) + (assert-equal + (carefully (lambda () (length (delv 0 l))) + (lambda () 'overflow) + (lambda () 'timeout)) + n)))) \ No newline at end of file -- 2.25.1