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:
commit
fc7e51a4f8
42 changed files with 782 additions and 435 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]
|
||||
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue