mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Merge pull request #7855 from jtracey/printf-nonzero
printf: use non-zero indexes
This commit is contained in:
commit
279629f67e
3 changed files with 49 additions and 33 deletions
|
@ -1341,6 +1341,11 @@ fn positional_format_specifiers() {
|
|||
.succeeds()
|
||||
.stdout_only("05-");
|
||||
|
||||
new_ucmd!()
|
||||
.args(&["%0$d%d-", "5", "10", "6", "20"])
|
||||
.fails_with_code(1)
|
||||
.stderr_only("printf: %0$: invalid conversion specification\n");
|
||||
|
||||
new_ucmd!()
|
||||
.args(&[
|
||||
"Octal: %6$o, Int: %1$d, Float: %4$f, String: %2$s, Hex: %7$x, Scientific: %5$e, Char: %9$c, Unsigned: %3$u, Integer: %8$i",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue