From c8772a7a21f954b5e75746529e70edc3a1017249 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 10 Jul 2013 18:04:08 +0200 Subject: records: `alist->record' supports multiple-field occurrences. * guix/records.scm (alist->record): Add `multiple-value-keys' parameter. Update docstring, and honor it. * tests/records.scm ("alist->record"): New record. --- tests/records.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/records.scm b/tests/records.scm index d0635ebb1f..712eb83a09 100644 --- a/tests/records.scm +++ b/tests/records.scm @@ -158,6 +158,12 @@ (define-record-type* foo make-foo (list (recutils->alist p) (recutils->alist p)))) +(test-equal "alist->record" '((1 2) b c) + (alist->record '(("a" . 1) ("b" . b) ("c" . c) ("a" . 2)) + list + '("a" "b" "c") + '("a"))) + (test-end) -- cgit v1.2.3