tests: use succeeds() instead of run()

This commit is contained in:
Daniel Hofstetter 2025-03-04 09:43:18 +01:00
parent 81afa8a7bb
commit 196f8407ae
2 changed files with 4 additions and 4 deletions

@ -26,7 +26,7 @@ fn test_kmsg_json() {
.arg("--kmsg-file") .arg("--kmsg-file")
.arg("kmsg.input") .arg("kmsg.input")
.arg("--json") .arg("--json")
.run() .succeeds()
.no_stderr() .no_stderr()
.stdout_is_templated_fixture("test_kmsg_json.expected", &[("\r\n", "\n")]); .stdout_is_templated_fixture("test_kmsg_json.expected", &[("\r\n", "\n")]);
} }

@ -130,11 +130,11 @@ mod unix {
let cmd_result = UCommand::new() let cmd_result = UCommand::new()
.terminal_simulation(true) .terminal_simulation(true)
.arg(&shell_cmd) .arg(&shell_cmd)
.run(); .succeeds();
let output = cmd_result.code_is(0).no_stderr().stdout_str(); let output = cmd_result.no_stderr().stdout_str();
// /proc/self/stat format has sessiion ID as the 6th space-separated // /proc/self/stat format has session ID as the 6th space-separated
// item; if we managed to get session leadership, we should see a // item; if we managed to get session leadership, we should see a
// difference there... // difference there...
let (before, after) = output let (before, after) = output