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:
parent
7c0ed0340b
commit
1fadeb43b2
40 changed files with 229 additions and 211 deletions
|
@ -288,7 +288,7 @@ fn test_float_inequality_is_error() {
|
|||
.args(&["123.45", "-ge", "6"])
|
||||
.run()
|
||||
.code_is(2)
|
||||
.stderr_is("test: invalid integer '123.45'");
|
||||
.stderr_is("test: invalid integer '123.45'\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -306,7 +306,7 @@ fn test_invalid_utf8_integer_compare() {
|
|||
|
||||
cmd.run()
|
||||
.code_is(2)
|
||||
.stderr_is("test: invalid integer $'fo\\x80o'");
|
||||
.stderr_is("test: invalid integer $'fo\\x80o'\n");
|
||||
|
||||
let mut cmd = new_ucmd!();
|
||||
cmd.raw.arg(arg);
|
||||
|
@ -314,7 +314,7 @@ fn test_invalid_utf8_integer_compare() {
|
|||
|
||||
cmd.run()
|
||||
.code_is(2)
|
||||
.stderr_is("test: invalid integer $'fo\\x80o'");
|
||||
.stderr_is("test: invalid integer $'fo\\x80o'\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -827,7 +827,7 @@ fn test_erroneous_parenthesized_expression() {
|
|||
.args(&["a", "!=", "(", "b", "-a", "b", ")", "!=", "c"])
|
||||
.run()
|
||||
.code_is(2)
|
||||
.stderr_is("test: extra argument 'b'");
|
||||
.stderr_is("test: extra argument 'b'\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -866,7 +866,7 @@ fn test_bracket_syntax_missing_right_bracket() {
|
|||
ucmd.args(&["1", "-eq"])
|
||||
.run()
|
||||
.code_is(2)
|
||||
.stderr_is("[: missing ']'");
|
||||
.stderr_is("[: missing ']'\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue