uutests: improve error message for non-empty stderr

This commit is contained in:
Tomasz Guz
2025-07-10 14:54:02 +02:00
parent f180be4265
commit a060344c6b
+5 -1
View File
@@ -695,7 +695,11 @@ impl CmdResult {
#[track_caller]
pub fn fails_silently(&self) -> &Self {
assert!(!self.succeeded());
assert!(self.stderr.is_empty());
assert!(
self.stderr.is_empty(),
"Expected stderr to be empty, but it's:\n{}",
self.stderr_str()
);
self
}