summaryrefslogtreecommitdiff
path: root/tests/toml.scm
diff options
context:
space:
mode:
authorLars-Dominik Braun <[email protected]>2024-12-20 12:29:32 +0100
committerRicardo Wurmus <[email protected]>2025-01-20 21:37:36 +0100
commit2e3d4f16d4add7abb3cc7195b058b0b3ab8df3da (patch)
tree60e20584d9268556ca2ad5b29e990d866ee3c26e /tests/toml.scm
parente3a69f37cacba3bc7526259bd41eea3ea2c614a7 (diff)
guix: toml: Fix evaluation of empty inline tables.
* guix/build/toml.scm (eval-toml-file): Add pattern for empty inline table. * tests/toml.scm ("parse-toml: Empty inline table"): New testcase. Change-Id: I69663af2a861716acfb801fad4474e029e102a1b
Diffstat (limited to 'tests/toml.scm')
-rw-r--r--tests/toml.scm8
1 files changed, 8 insertions, 0 deletions
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]