summaryrefslogtreecommitdiff
path: root/tests/records.scm
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2023-06-04 10:31:08 +0200
committerJosselin Poiret <dev@jpoiret.xyz>2023-06-04 10:59:28 +0200
commit178ffed3b7fe1784fff67b963c5c4bb667fbad2a (patch)
tree42a124bbc7c8277aca5d6f6e20d20e58bcce1868 /tests/records.scm
parentf045c7ac80d36777f885e8ecab7affcb2683eb36 (diff)
tests: records: Add test for ellipsis in body.
* tests/records.scm ("match-record, ellipsis in body"): New test.
Diffstat (limited to 'tests/records.scm')
-rw-r--r--tests/records.scm13
1 files changed, 13 insertions, 0 deletions
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 <with-thunked> (normal thunked)
(list normal thunked)))))
+(test-equal "match-record, ellipsis in body"
+ #t
+ (begin
+ (define-record-type* <foo> foo make-foo foo?
+ (value foo-value))
+ (define bar (foo (value '(1 2 3))))
+ (match-record bar <foo> (value)
+ (match value
+ ((one two ...)
+ #t)
+ (_
+ #f)))))
+
(test-equal "match-record-lambda"
'("thing: foo" "thing: bar")
(begin