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

tests: (head) cargo fmt

This commit is contained in:
Roy Ivy III 2020-08-08 23:04:29 -05:00
parent c1f518e586
commit b38abbce5e

View file

@ -88,10 +88,7 @@ fn test_verbose() {
#[test] #[test]
fn test_spams_newline() { fn test_spams_newline() {
new_ucmd!() new_ucmd!().pipe_in("a").succeeds().stdout_is("a\n");
.pipe_in("a")
.succeeds()
.stdout_is("a\n");
} }
#[test] #[test]
@ -102,7 +99,7 @@ fn test_unsupported_byte_syntax() {
.fails() .fails()
//GNU head returns "a" //GNU head returns "a"
.stdout_is("") .stdout_is("")
.stderr_is("head: error: Unrecognized option: \'1\'"); .stderr_is("head: error: Unrecognized option: \'1\'");
} }
#[test] #[test]
@ -113,7 +110,7 @@ fn test_unsupported_line_syntax() {
.fails() .fails()
//.stdout_is("a\n"); What GNU head returns. //.stdout_is("a\n"); What GNU head returns.
.stdout_is("") .stdout_is("")
.stderr_is("head: error: invalid line count \'2048m\': invalid digit found in string"); .stderr_is("head: error: invalid line count \'2048m\': invalid digit found in string");
} }
#[test] #[test]
@ -123,7 +120,7 @@ fn test_unsupported_zero_terminated_syntax() {
.pipe_in("x\0y") .pipe_in("x\0y")
.fails() .fails()
//GNU Head returns "x\0" //GNU Head returns "x\0"
.stderr_is("head: error: Unrecognized option: \'z\'"); .stderr_is("head: error: Unrecognized option: \'z\'");
} }
#[test] #[test]
@ -133,10 +130,9 @@ fn test_unsupported_zero_terminated_syntax_2() {
.pipe_in("x\0y") .pipe_in("x\0y")
.fails() .fails()
//GNU Head returns "x\0y" //GNU Head returns "x\0y"
.stderr_is("head: error: Unrecognized option: \'z\'"); .stderr_is("head: error: Unrecognized option: \'z\'");
} }
#[test] #[test]
fn test_unsupported_negative_byte_syntax() { fn test_unsupported_negative_byte_syntax() {
new_ucmd!() new_ucmd!()
@ -144,7 +140,7 @@ fn test_unsupported_negative_byte_syntax() {
.pipe_in("a\n") .pipe_in("a\n")
.fails() .fails()
//GNU Head returns "" //GNU Head returns ""
.stderr_is("head: error: invalid byte count \'-2\': invalid digit found in string"); .stderr_is("head: error: invalid byte count \'-2\': invalid digit found in string");
} }
#[test] #[test]
@ -154,5 +150,5 @@ fn test_bug_in_negative_zero_lines() {
.pipe_in("a\nb\n") .pipe_in("a\nb\n")
.succeeds() .succeeds()
//GNU Head returns "a\nb\n" //GNU Head returns "a\nb\n"
.stdout_is(""); .stdout_is("");
} }