mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
tests/printf: Verify the correct error behavior of printf when provided with '%0c' or '%0s'
This commit is contained in:
parent
75b2bfb111
commit
58ee0ce427
1 changed files with 12 additions and 0 deletions
|
@ -765,3 +765,15 @@ fn pad_string() {
|
|||
.stdout_only(expected);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn format_spec_zero_char_fails() {
|
||||
// It is invalid to have the format spec '%0c'
|
||||
new_ucmd!().args(&["%0c", "3"]).fails().code_is(1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn format_spec_zero_string_fails() {
|
||||
// It is invalid to have the format spec '%0s'
|
||||
new_ucmd!().args(&["%0s", "3"]).fails().code_is(1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue