mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
tests: replace run() with succeeds() or fails()
This commit is contained in:
parent
3844a74c38
commit
df4dfea852
39 changed files with 434 additions and 498 deletions
|
@ -16,7 +16,7 @@ fn test_invalid_arg() {
|
|||
fn test_stdin_default() {
|
||||
new_ucmd!()
|
||||
.pipe_in("100\n200\n300\n400\n500")
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is("500400\n300\n200\n100\n");
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ fn test_stdin_non_newline_separator() {
|
|||
new_ucmd!()
|
||||
.args(&["-s", ":"])
|
||||
.pipe_in("100:200:300:400:500")
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is("500400:300:200:100:");
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ fn test_stdin_non_newline_separator_before() {
|
|||
new_ucmd!()
|
||||
.args(&["-b", "-s", ":"])
|
||||
.pipe_in("100:200:300:400:500")
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is(":500:400:300:200100");
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ fn test_stdin_non_newline_separator_before() {
|
|||
fn test_single_default() {
|
||||
new_ucmd!()
|
||||
.arg("prime_per_line.txt")
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is_fixture("prime_per_line.expected");
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ fn test_single_default() {
|
|||
fn test_single_non_newline_separator() {
|
||||
new_ucmd!()
|
||||
.args(&["-s", ":", "delimited_primes.txt"])
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is_fixture("delimited_primes.expected");
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ fn test_single_non_newline_separator() {
|
|||
fn test_single_non_newline_separator_before() {
|
||||
new_ucmd!()
|
||||
.args(&["-b", "-s", ":", "delimited_primes.txt"])
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is_fixture("delimited_primes_before.expected");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue