Add stdin test

This commit is contained in:
sharkdp committed 2020-11-01 21:35:35 +01:00
1 parent afb249e854
commit 66f8508b57
1 file changed
+14
+14
View File
@@ -20,6 +20,20 @@ fn can_print_simple_ascii_file() {
);
}
#[test]
fn can_read_input_from_stdin() {
hexyl()
.arg("--color=never")
.write_stdin("abc")
.assert()
.success()
.stdout(
"┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐\n\
│00000000│ 61 62 63 ┊ │abc ┊ │\n\
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘\n",
);
}
#[test]
fn fails_on_non_existing_input() {
hexyl().arg("non-existing").assert().failure();