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
|
@ -15,7 +15,7 @@ fn test_invalid_arg() {
|
|||
fn test_stdin_no_newline() {
|
||||
new_ucmd!()
|
||||
.pipe_in("No Newline")
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is(" 1\tNo Newline\n");
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ fn test_stdin_newline() {
|
|||
new_ucmd!()
|
||||
.args(&["-s", "-", "-w", "1"])
|
||||
.pipe_in("Line One\nLine Two\n")
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is("1-Line One\n2-Line Two\n");
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ fn test_stdin_newline() {
|
|||
fn test_padding_without_overflow() {
|
||||
new_ucmd!()
|
||||
.args(&["-i", "1000", "-s", "x", "-n", "rz", "simple.txt"])
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is(
|
||||
"000001xL1\n001001xL2\n002001xL3\n003001xL4\n004001xL5\n005001xL6\n006001xL7\n0070\
|
||||
01xL8\n008001xL9\n009001xL10\n010001xL11\n011001xL12\n012001xL13\n013001xL14\n014\
|
||||
|
@ -44,7 +44,7 @@ fn test_padding_without_overflow() {
|
|||
fn test_padding_with_overflow() {
|
||||
new_ucmd!()
|
||||
.args(&["-i", "1000", "-s", "x", "-n", "rz", "-w", "4", "simple.txt"])
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is(
|
||||
"0001xL1\n1001xL2\n2001xL3\n3001xL4\n4001xL5\n5001xL6\n6001xL7\n7001xL8\n8001xL9\n\
|
||||
9001xL10\n10001xL11\n11001xL12\n12001xL13\n13001xL14\n14001xL15\n",
|
||||
|
@ -73,7 +73,7 @@ fn test_sections_and_styles() {
|
|||
.args(&[
|
||||
"-s", "|", "-n", "ln", "-w", "3", "-b", "a", "-l", "5", fixture,
|
||||
])
|
||||
.run()
|
||||
.succeeds()
|
||||
.stdout_is(output);
|
||||
}
|
||||
// spell-checker:enable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue