From 63cb43d56cab5cea439890056359434d89c2b611 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 4 May 2024 09:43:11 +0200 Subject: guix: toml: Fix parsing empty strings in arrays. Change-Id: Id14d4008391a01820ade754fa9c2ca8e88b8c7f9 --- tests/toml.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'tests/toml.scm') diff --git a/tests/toml.scm b/tests/toml.scm index cd731cd2f0c..cd8e4d2338b 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)) -- cgit v1.2.3