diff --git a/tests/by-util/test_wc.rs b/tests/by-util/test_wc.rs index a0fe8889b..fc9c00ecc 100644 --- a/tests/by-util/test_wc.rs +++ b/tests/by-util/test_wc.rs @@ -8,6 +8,17 @@ fn test_stdin_default() { .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] fn test_stdin_line_len_regression() { new_ucmd!() diff --git a/tests/fixtures/wc/UTF_8_test.txt b/tests/fixtures/wc/UTF_8_test.txt new file mode 100644 index 000000000..a5b5d50e6 Binary files /dev/null and b/tests/fixtures/wc/UTF_8_test.txt differ