1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 19:36:16 +00:00

comm: implement --total

This commit is contained in:
Daniel Hofstetter 2023-01-24 13:36:13 +01:00
parent dce8a021da
commit b06485990d
4 changed files with 39 additions and 0 deletions

View file

@ -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
View file

@ -0,0 +1,4 @@
a
b
z
1 1 1 total

View file

@ -0,0 +1 @@
1 1 1 total