aboutsummaryrefslogtreecommitdiff
path: root/tests/records.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-07-10 17:01:47 +0200
committerLudovic Courtès <ludo@gnu.org>2013-07-10 18:01:12 +0200
commitb7b88288011aa41791b6634ae229f426bacc55ce (patch)
tree44e694859112482d9978e588293b741426460e60 /tests/records.scm
parentfdc1bf659d9834fce6c78d31680b580eab3f4235 (diff)
downloadguix-b7b88288011aa41791b6634ae229f426bacc55ce.tar
guix-b7b88288011aa41791b6634ae229f426bacc55ce.tar.gz
records: `recutils->alist' recognizes comments.
* guix/records.scm (%recutils-comment-rx): New variable. (recutils->alist): Match comments. * tests/records.scm ("recutils->alist"): Add comments.
Diffstat (limited to 'tests/records.scm')
-rw-r--r--tests/records.scm14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/records.scm b/tests/records.scm
index 470644451c..d0635ebb1f 100644
--- a/tests/records.scm
+++ b/tests/records.scm
@@ -138,13 +138,23 @@
("Something_else" . "chbouib"))
(("Name" . "bar")
("Version" . "1.5")))
- (let ((p (open-input-string "Name: foo
+ (let ((p (open-input-string "
+# Comment following an empty line, and
+# preceding a couple of empty lines, all of
+# which should be silently consumed.
+
+
+Name: foo
Version: 0.1
+# Comment right in the middle,
+# spanning two lines.
Synopsis: foo bar
Something_else: chbouib
+# Comment right before.
Name: bar
-Version: 1.5")))
+Version: 1.5
+# Comment at the end.")))
(list (recutils->alist p)
(recutils->alist p))))