summaryrefslogtreecommitdiff
path: root/tests/records.scm
diff options
context:
space:
mode:
authorAttila Lendvai <attila@lendvai.name>2022-12-21 23:14:55 -0300
committerLudovic Courtès <ludo@gnu.org>2022-12-27 23:53:42 +0100
commit363b20b68584d71556c2d8912dd07cbdacabdb25 (patch)
tree298c02b808007db90d8c006a7de1be0dc6589182 /tests/records.scm
parent361aad5ce33afeefa269533c33141fc77f74837c (diff)
records: match-record supports specifying a different variable name.
An example: (match-record obj <my-type> (field1 (field2 custom-var-name) field3) ...) * guix/records.scm (match-record-inner): Add support for the new syntax. * tests/records.scm ("match-record, simple"): Add a simple test case for the new syntax. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests/records.scm')
-rw-r--r--tests/records.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/records.scm b/tests/records.scm
index 8504c8d5a5..b1203dfeb7 100644
--- a/tests/records.scm
+++ b/tests/records.scm
@@ -540,8 +540,8 @@ Description: 1st line,
(first second)
(list first second))
(match-record (foo (first 'a) (second 'b)) <foo>
- (second first)
- (list first second)))))
+ (second (first first/new-var))
+ (list first/new-var second)))))
(test-equal "match-record, unknown field"
'syntax-error