mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests/util: Introduce CmdResult::stdout_str_apply ... to preprocess stdout, stderr before asserting
This commit is contained in:
parent
3977ef608e
commit
37e06edadc
3 changed files with 83 additions and 13 deletions
|
@ -28,8 +28,11 @@ fn test_uname_processor() {
|
|||
|
||||
#[test]
|
||||
fn test_uname_hardware_platform() {
|
||||
let result = new_ucmd!().arg("-i").succeeds();
|
||||
assert_eq!(result.stdout_str().trim_end(), "unknown");
|
||||
new_ucmd!()
|
||||
.arg("-i")
|
||||
.succeeds()
|
||||
.stdout_str_apply(str::trim_end)
|
||||
.stdout_only("unknown");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue