mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
tests/printf: Verify the correct error behavior of printf when provided with '%0c' or '%0s'
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user