Skip to content

printf: %0s and %0c should fail #6030

@cakebaker

Description

@cakebaker

While reviewing #6028 I noticed that the format specifications %0s and %0c fail with GNU printf whereas with uutils printf they don't:

$ /usr/bin/printf "%0s"
/usr/bin/printf: %0s: invalid conversion specification
$ echo $?
1
$ /usr/bin/printf "%0c"
/usr/bin/printf: %0c: invalid conversion specification
$ echo $?
1

$ cargo run printf "%0s"
$ echo $?
0
$ cargo run printf "%0c"
$ echo $?
0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions