test: capture message with .stderr_contains

This commit is contained in:
Dmitry Shemetov
2025-12-23 23:30:47 +01:00
committed by Sylvestre Ledru
parent cf2fa7c556
commit a1596caa8c
+2 -1
View File
@@ -477,7 +477,8 @@ fn test_touch_reference_dangling() {
dangling_symlink.to_str().unwrap(),
"some_file",
])
.fails();
.fails()
.stderr_contains("touch: failed to get attributes of");
}
#[test]