1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

printf: show warning message in case of excess arguments

This commit is contained in:
Dorian Peron 2025-01-29 13:57:20 +01:00
parent 64476fd9da
commit ae6cb8fed3
2 changed files with 14 additions and 2 deletions

View file

@ -679,7 +679,11 @@ fn char_as_byte() {
#[test]
fn no_infinite_loop() {
new_ucmd!().args(&["a", "b"]).succeeds().stdout_only("a");
new_ucmd!()
.args(&["a", "b"])
.succeeds()
.stdout_is("a")
.stderr_contains("warning: ignoring excess arguments, starting with 'b'");
}
#[test]