mirror of
https://https.git.savannah.gnu.org/git/gettext.git
synced 2026-01-26 15:39:11 +00:00
ruby-format: Accept null precision.
Proof that it's valid: $ ruby puts "%.f" % 3.1415926535 * gettext-tools/src/format-ruby.c: Clarify comment regarding the precision. * gettext-tools/tests/format-ruby-1: Add test cases with null precision.
This commit is contained in:
parent
3e846209ca
commit
5b2a00875c
@ -50,7 +50,7 @@
|
||||
- '*', indicating a width, taken from the argument list,
|
||||
- '*' and a digit sequence, followed by '$', indicating a width, taken
|
||||
from a positional argument,
|
||||
- '.' and a digit sequence, indicating a precision,
|
||||
- '.' and an optional nonempty digit sequence, indicating a precision,
|
||||
- '.' '*', indicating a precision, taken from the argument list,
|
||||
- '.' '*' and a digit sequence, followed by '$', indicating a precision,
|
||||
taken from a positional argument.
|
||||
|
||||
@ -241,6 +241,10 @@ cat <<\EOF > f-r-1.data
|
||||
"abc%2$2*1$g"
|
||||
# Invalid: twice width (numbered)
|
||||
"abc%2$*1$2g"
|
||||
# Valid: null precision (unnumbered)
|
||||
"abc%.f"
|
||||
# Valid: null precision (numbered)
|
||||
"abc%1$.f"
|
||||
# Invalid: twice precision (unnumbered)
|
||||
"abc%.4.2g"
|
||||
# Invalid: twice precision (numbered)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user