GNU bug report logs -
#74993
[PATCH] guix: toml: Fix evaluation of empty inline tables.
Previous Next
Reported by: Lars-Dominik Braun <lars <at> 6xq.net>
Date: Fri, 20 Dec 2024 11:30:03 UTC
Severity: normal
Tags: patch
Done: Ricardo Wurmus <rekado <at> elephly.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sun, 05 Jan 2025 13:53:27 +0100
with message-id <874j2d5smw.fsf <at> elephly.net>
and subject line [PATCH] guix: toml: Fix evaluation of empty inline tables.
has caused the debbugs.gnu.org bug report #74993,
regarding [PATCH] guix: toml: Fix evaluation of empty inline tables.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
74993: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74993
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* 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
---
guix/build/toml.scm | 1 +
tests/toml.scm | 8 ++++++++
2 files changed, 9 insertions(+)
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 @@ (define (eval-toml-file parse-tree)
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 @@ (define-module (test-toml)
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]
base-commit: 946e48d1d87ec451e7a6315712f2e86c79961a51
--
2.45.2
[Message part 3 (message/rfc822, inline)]
I've just pushed it to the python-team branch.
--
Ricardo
This bug report was last modified 195 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.