1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

tests/util: Don't trim output in CmdResult::stdout_matches and stdout_does_not_match (#4304)

* tests/util: Fix documentation of UCommand::stderr_only and usage_error

* tests/util: Remove trimming from CmdResult::stdout_matches and stdout_does_not_match. Fix tests.

The tests are fixed to match the trailing newline instead of ignoring it.
This commit is contained in:
Joining7943 2023-02-16 15:33:33 +01:00 committed by GitHub
parent ff5000d4d0
commit f610f33aa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 15 deletions

View file

@ -950,7 +950,7 @@ fn test_ls_commas_trailing() {
.arg("./test-commas-trailing-1")
.arg("./test-commas-trailing-2")
.succeeds()
.stdout_matches(&Regex::new(r"\S$").unwrap()); // matches if there is no whitespace at the end of stdout.
.stdout_matches(&Regex::new(r"\S\n$").unwrap());
}
#[test]