From: Bruno Haible Date: Sat, 21 Jun 2025 22:16:28 +0000 (+0200) Subject: d-format: Accept null precision. X-Git-Tag: v0.26~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=36f19a58d566cb3a130e4c88536979b45e29bdd2;p=thirdparty%2Fgettext.git 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. --- 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