summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/build/toml.scm1
-rw-r--r--tests/toml.scm8
2 files changed, 9 insertions, 0 deletions
diff --git a/guix/build/toml.scm b/guix/build/toml.scm
index 81b54fa5b7..a9be0887e7 100644
--- a/guix/build/toml.scm
+++ b/guix/build/toml.scm
@@ -414,6 +414,7 @@ the list KEY. For instance a KEY (a b) would retrieve alist[a][b]."
local-time)
tails)))
('array (list))
+ ('inline-table '())
(('inline-table tails ...)
(eval (keyword-flatten '(keyval) tails) '() '()))))
diff --git a/tests/toml.scm b/tests/toml.scm
index cd8e4d2338..64bc667f0c 100644
--- a/tests/toml.scm
+++ b/tests/toml.scm
@@ -396,6 +396,14 @@ fruit.apple.taste.sweet = true"))
point = { x = 1, y = 2 }
animal = { type.name = \"pug\" }"))
+(test-equal "parse-toml: Empty inline table"
+ '(("name")
+ ("point")
+ ("animal"))
+ (parse-toml "name = {}
+point = { }
+animal = { }"))
+
(test-error "parse-toml: Invalid assignment to inline table"
#t
(parse-toml "[product]