]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
python-brace-format: Reject null precision.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jun 2025 00:58:31 +0000 (02:58 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jun 2025 00:58:31 +0000 (02:58 +0200)
Proof that it's invalid:
$ python
print("{value:.}".format(value = 3.141592535))

* gettext-tools/tests/format-python-brace-1: Add another test case with null
precision.

gettext-tools/tests/format-python-brace-1

index 0028f7fdb5ac5164dbd9c3da570322319f33ac25..8ab4ddfe48fe5fac694a770fade99340472f3f78 100755 (executable)
@@ -42,7 +42,9 @@ cat <<\EOF > f-pyb-1.data
 "abc{value[name]:0}"
 # Valid: standard format specifier
 "abc{value:<<-#012.34e}"
-# Invalid: empty precision
+# Invalid: null precision
+"abc{value:.}"
+# Invalid: null precision
 "abc{value:8.}"
 # Invalid: non-standard format specifier
 "abc{value:<c>}"