mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
wc: emit '-' in ouput when set on command-line
When stdin is explicitly specified on the command-line with '-', emit it in the output stats to match GNU wc output. Fixes #2188.
This commit is contained in:
parent
d43af35147
commit
112b042769
3 changed files with 85 additions and 32 deletions
|
@ -36,6 +36,15 @@ fn test_stdin_default() {
|
|||
.stdout_is(" 13 109 772\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_stdin_explicit() {
|
||||
new_ucmd!()
|
||||
.pipe_in_fixture("lorem_ipsum.txt")
|
||||
.arg("-")
|
||||
.run()
|
||||
.stdout_is(" 13 109 772 -\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_utf8() {
|
||||
new_ucmd!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue