python-brace-format: Reject null precision.

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.
This commit is contained in:
Bruno Haible 2025-06-22 02:58:31 +02:00
parent b6ea1c2cbe
commit 3e846209ca

View File

@ -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>}"