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

tests/util: Do not trim stderr in CmdResult::stderr_is. Add method stderr_trimmed_is.

Fix tests assert whitespace instead of trimming it. Disable some tests in `test_tr` because `tr`
produces too many newlines.
This commit is contained in:
Joining7943 2023-01-05 21:09:15 +01:00
parent 7c0ed0340b
commit 1fadeb43b2
40 changed files with 229 additions and 211 deletions

View file

@ -29,7 +29,7 @@ fn test_link_no_circular() {
ucmd.args(&[link, link])
.fails()
.stderr_is("link: cannot create link 'test_link_no_circular' to 'test_link_no_circular': No such file or directory");
.stderr_is("link: cannot create link 'test_link_no_circular' to 'test_link_no_circular': No such file or directory\n");
assert!(!at.file_exists(link));
}
@ -41,7 +41,7 @@ fn test_link_nonexistent_file() {
ucmd.args(&[file, link])
.fails()
.stderr_only("link: cannot create link 'test_link_nonexistent_file_link' to 'test_link_nonexistent_file': No such file or directory");
.stderr_only("link: cannot create link 'test_link_nonexistent_file_link' to 'test_link_nonexistent_file': No such file or directory\n");
assert!(!at.file_exists(file));
assert!(!at.file_exists(link));
}