summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-07-10 18:26:46 +0200
committerLudovic Courtès <ludo@gnu.org>2013-07-10 21:53:29 +0200
commit836d10f154275e56c7185c1fcd6daee2027b41de (patch)
treef4d3dd5bb2954232d8125555a17286b88536cf8d /tests
parentb0efe83a8f3d37600b9b31a67dd5265e3e1f1fa7 (diff)
records: `recutils->alist' recognizes lines starting with a `+'.
* guix/records.scm (%recutils-plus-rx): New variable. (recutils->alist): Use it to read + lines. * tests/records.scm ("recutils->alist with + lines"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/records.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/records.scm b/tests/records.scm
index 712eb83a09..851ff7bdef 100644
--- a/tests/records.scm
+++ b/tests/records.scm
@@ -158,6 +158,16 @@ Version: 1.5
(list (recutils->alist p)
(recutils->alist p))))
+(test-equal "recutils->alist with + lines"
+ '(("Name" . "foo")
+ ("Description" . "1st line,\n2nd line,\n 3rd line with extra space,\n4th line without space."))
+ (recutils->alist (open-input-string "
+Name: foo
+Description: 1st line,
++ 2nd line,
++ 3rd line with extra space,
++4th line without space.")))
+
(test-equal "alist->record" '((1 2) b c)
(alist->record '(("a" . 1) ("b" . b) ("c" . c) ("a" . 2))
list