From 178ffed3b7fe1784fff67b963c5c4bb667fbad2a Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Sun, 4 Jun 2023 10:31:08 +0200 Subject: tests: records: Add test for ellipsis in body. * tests/records.scm ("match-record, ellipsis in body"): New test. --- tests/records.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/records.scm b/tests/records.scm index 8ee306bddc..5464892d3b 100644 --- a/tests/records.scm +++ b/tests/records.scm @@ -590,6 +590,19 @@ Description: 1st line, (match-record rec (normal thunked) (list normal thunked))))) +(test-equal "match-record, ellipsis in body" + #t + (begin + (define-record-type* foo make-foo foo? + (value foo-value)) + (define bar (foo (value '(1 2 3)))) + (match-record bar (value) + (match value + ((one two ...) + #t) + (_ + #f))))) + (test-equal "match-record-lambda" '("thing: foo" "thing: bar") (begin -- cgit 1.4.1