summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2024-05-04 09:43:11 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-10-11 21:18:09 +0100
commit1769634bde7d4eaf8d56ce9aff3e294cf664a612 (patch)
tree01a1705a6dceb83c59ec3b0fd272d439448b39df /tests
parent0cb8343761e503b6c4297d085e13eb103d931913 (diff)
guix: toml: Fix parsing empty strings in arrays.
Change-Id: Id14d4008391a01820ade754fa9c2ca8e88b8c7f9
Diffstat (limited to 'tests')
-rw-r--r--tests/toml.scm27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/toml.scm b/tests/toml.scm
index cd731cd2f0..cd8e4d2338 100644
--- a/tests/toml.scm
+++ b/tests/toml.scm
@@ -305,6 +305,33 @@ integers3 = [
2, # this is ok
]"))
+(test-equal "parse-toml: Arrays of empty strings"
+ '(("empty1" "")
+ ("empty2" "" "")
+ ("empty3" "" "" "")
+ ("emptyraw1" "")
+ ("emptyraw2" "" "")
+ ("emptyraw3" "" "" "")
+ ("emptyml1" "")
+ ("emptyml2" "" "")
+ ("emptyml3" "" "" "")
+ ("emptyrawml1" "")
+ ("emptyrawml2" "" "")
+ ("emptyrawml3" "" "" ""))
+ (parse-toml "empty1 = [ \"\" ]
+empty2 = [ \"\", \"\" ]
+empty3 = [ \"\", \"\", \"\" ]
+emptyraw1 = [ '' ]
+emptyraw2 = [ '', '' ]
+emptyraw3 = [ '', '', '' ]
+emptyml1 = [ \"\"\"\"\"\" ]
+emptyml2 = [ \"\"\"\"\"\", \"\"\"\"\"\" ]
+emptyml3 = [ \"\"\"\"\"\", \"\"\"\"\"\", \"\"\"\"\"\" ]
+emptyrawml1 = [ '''''' ]
+emptyrawml2 = [ '''''', '''''' ]
+emptyrawml3 = [ '''''', '''''', '''''' ]
+"))
+
(test-equal "parse-toml: Tables"
'(("table-1" ("key1" . "some string")
("key2" . 123))