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

Merge pull request #4261 from Joining7943/tests-util-enhance-cmdresult

`tests/util`: Implement enhancements of `CmdResult` #4259
This commit is contained in:
Terts Diepraam 2023-01-25 10:06:32 +01:00 committed by GitHub
commit fc7e51a4f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 782 additions and 435 deletions

View file

@ -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]
@ -875,7 +875,7 @@ fn test_bracket_syntax_missing_right_bracket() {
ucmd.args(&["1", "-eq"])
.run()
.code_is(2)
.stderr_is("[: missing ']'");
.stderr_is("[: missing ']'\n");
}
#[test]