From 36f19a58d566cb3a130e4c88536979b45e29bdd2 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jun 2025 00:16:28 +0200 Subject: [PATCH] d-format: Accept null precision. 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gettext-tools/tests/format-d-1 b/gettext-tools/tests/format-d-1 index 2691f3983..42ab7c44d 100755 --- a/gettext-tools/tests/format-d-1 +++ b/gettext-tools/tests/format-d-1 @@ -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 -- 2.47.3