mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-15 19:36:16 +00:00
Merge pull request #4300 from cakebaker/comm_total
comm: implement --total
This commit is contained in:
commit
d8c3205d4c
4 changed files with 39 additions and 0 deletions
|
@ -55,6 +55,22 @@ fn empty_empty() {
|
|||
.stdout_only_fixture("emptyempty.expected"); // spell-checker:disable-line
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn total() {
|
||||
new_ucmd!()
|
||||
.args(&["--total", "a", "b"])
|
||||
.succeeds()
|
||||
.stdout_is_fixture("ab_total.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn total_with_suppressed_regular_output() {
|
||||
new_ucmd!()
|
||||
.args(&["--total", "-123", "a", "b"])
|
||||
.succeeds()
|
||||
.stdout_is_fixture("ab_total_suppressed_regular_output.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn output_delimiter() {
|
||||
new_ucmd!()
|
||||
|
|
4
tests/fixtures/comm/ab_total.expected
vendored
Normal file
4
tests/fixtures/comm/ab_total.expected
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
a
|
||||
b
|
||||
z
|
||||
1 1 1 total
|
1
tests/fixtures/comm/ab_total_suppressed_regular_output.expected
vendored
Normal file
1
tests/fixtures/comm/ab_total_suppressed_regular_output.expected
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
1 1 1 total
|
Loading…
Add table
Add a link
Reference in a new issue