]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
d-format: Accept null precision.
authorBruno Haible <bruno@clisp.org>
Sat, 21 Jun 2025 22:16:28 +0000 (00:16 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 21 Jun 2025 22:16:28 +0000 (00:16 +0200)
Proof that a null precision is valid:
------------------------------- foo.d -------------------------------
import std.stdio;
import std.format;
void main () { writeln (format ("%.f", 3.1415926)); }
---------------------------------------------------------------------

* gettext-tools/tests/format-d-1: Add a test case with null precision.

gettext-tools/tests/format-d-1

index 2691f3983ceaa40c45175fb960ef4e2a6b81507f..42ab7c44d2e80ef82b2e5c5b953534f1b3b62207 100755 (executable)
@@ -146,6 +146,8 @@ cat <<\EOF > f-d-1.data
 "abc%,*0g"
 # Invalid: precision after separator
 "abc%,4.2g"
+# Valid: null precision
+"abc%.f"
 # Invalid: twice precision
 "abc%.4.2g"
 # Invalid: twice separator