printf 1 > /dev/full is not silent

This commit is contained in:
oech3
2026-01-11 14:05:04 +09:00
parent e96b5369f5
commit dc433bcacb
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ impl Display for FormatError {
Self::InvalidPrecision(precision) => write!(f, "invalid precision: '{precision}'"),
// TODO: Error message below needs some work
Self::WrongSpecType => write!(f, "wrong % directive type was given"),
Self::IoError(_) => write!(f, "write error"),
Self::IoError(e) => write!(f, "write error: {e}"),
Self::NoMoreArguments => write!(f, "no more arguments"),
Self::InvalidArgument(_) => write!(f, "invalid argument"),
Self::MissingHex => write!(f, "missing hexadecimal number in escape"),
+1 -1
View File
@@ -1490,5 +1490,5 @@ fn test_extreme_field_width_overflow() {
new_ucmd!()
.args(&["%999999999999999999999999d", "1"])
.fails_with_code(1)
.stderr_only("printf: write error\n");
.stderr_contains("printf: write error"); //could contains additional message like "formatting width too large" not in GNU, thats fine.
}