mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #821 from ebfe/cat-test
tests/cat: --squeeze-blank test
This commit is contained in:
+11
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user