coreutils/tests/by-util/test_paste.rs
Ali 374a4fde86
paste: support multi-stdin (#1791)
- added `-` as the default input, since `paste` reads stdin if no file
is provided
- `paste` also supports providing `-` multiple times
- added a test for it
2021-03-10 23:19:12 +01:00

24 lines
612 B
Rust

use crate::common::util::*;
#[test]
fn test_combine_pairs_of_lines() {
for s in vec!["-s", "--serial"] {
for d in vec!["-d", "--delimiters"] {
new_ucmd!()
.args(&[s, d, "\t\n", "html_colors.txt"])
.run()
.stdout_is_fixture("html_colors.expected");
}
}
}
#[test]
fn test_multi_stdin() {
for d in vec!["-d", "--delimiters"] {
new_ucmd!()
.args(&[d, "\t\n", "-", "-"])
.pipe_in_fixture("html_colors.txt")
.succeeds()
.stdout_is_fixture("html_colors.expected");
}
}