1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

bug(wc): Add a test for unexpected behavior (#1723)

This commit is contained in:
Chad Brewbaker 2021-02-16 06:36:49 -06:00 committed by GitHub
parent f595164063
commit 05d8cc59c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -8,6 +8,17 @@ fn test_stdin_default() {
.stdout_is(" 13 109 772\n"); .stdout_is(" 13 109 772\n");
} }
#[test]
fn test_utf8() {
new_ucmd!()
.args(&["-lwmcL"])
.pipe_in_fixture("UTF_8_test.txt")
.run()
.stdout_is(" 0 0 0 0 0\n");
// GNU returns " 300 2086 22219 22781 79"
// TODO: we should fix that to match GNU's behavior
}
#[test] #[test]
fn test_stdin_line_len_regression() { fn test_stdin_line_len_regression() {
new_ucmd!() new_ucmd!()

BIN
tests/fixtures/wc/UTF_8_test.txt vendored Normal file

Binary file not shown.