mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
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
This commit is contained in:
parent
734ef0a8a1
commit
374a4fde86
2 changed files with 49 additions and 11 deletions
|
@ -2,8 +2,23 @@ use crate::common::util::*;
|
|||
|
||||
#[test]
|
||||
fn test_combine_pairs_of_lines() {
|
||||
new_ucmd!()
|
||||
.args(&["-s", "-d", "\t\n", "html_colors.txt"])
|
||||
.run()
|
||||
.stdout_is_fixture("html_colors.expected");
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue