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

tests/cat: --squeeze-blank test

This commit is contained in:
Michael Gehring 2016-02-17 08:06:28 +01:00
parent aafd20d565
commit c0d91d225f

View file

@ -28,7 +28,7 @@ fn test_output_multi_files_print_all_chars() {
}
#[test]
fn test_stdin_squeeze() {
fn test_stdin_show_all() {
let (_, mut ucmd) = testing(UTIL_NAME);
let out = ucmd.arg("-A")
.run_piped_stdin("\x00\x01\x02".as_bytes())
@ -37,6 +37,16 @@ fn test_stdin_squeeze() {
assert_eq!(out, "^@^A^B");
}
#[test]
fn test_stdin_squeeze_blank() {
let (_, mut ucmd) = testing(UTIL_NAME);
let out = ucmd.arg("--squeeze-blank")
.run_piped_stdin("\n\na\n\n\n\n\nb\n\n\n".as_bytes())
.stdout;
assert_eq!(out, "\na\n\nb\n\n");
}
#[test]
fn test_stdin_number_non_blank() {
let (_, mut ucmd) = testing(UTIL_NAME);