diff --git a/tests/by-util/test_cut.rs b/tests/by-util/test_cut.rs index b94a15834..79fb1488a 100644 --- a/tests/by-util/test_cut.rs +++ b/tests/by-util/test_cut.rs @@ -374,6 +374,20 @@ fn test_output_delimiter_with_adjacent_ranges() { .stdout_only("ab:cd\n"); } +#[test] +fn test_emoji_delim() { + new_ucmd!() + .args(&["-d🗿", "-f1"]) + .pipe_in("💐🗿🌹\n") + .succeeds() + .stdout_only("💐\n"); + new_ucmd!() + .args(&["-d🗿", "-f2"]) + .pipe_in("💐🗿🌹\n") + .succeeds() + .stdout_only("🌹\n"); +} + #[cfg(target_os = "linux")] #[test] fn test_failed_write_is_reported() { diff --git a/tests/by-util/test_join.rs b/tests/by-util/test_join.rs index 8a239b965..9041cb560 100644 --- a/tests/by-util/test_join.rs +++ b/tests/by-util/test_join.rs @@ -566,3 +566,17 @@ fn test_join_non_utf8_paths() { .stdout_only("a 1 2\n"); } } + +#[test] +fn join_emoji_delim_inner_key() { + let ts = TestScenario::new(util_name!()); + let at = &ts.fixtures; + + at.write("file1", "a🗿b\n"); + at.write("file2", "u🗿b\n"); + + ts.ucmd() + .args(&["-t🗿", "-1", "2", "-2", "2", "file1", "file2"]) + .succeeds() + .stdout_only("b🗿a🗿u\n"); +} diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index 72b4b770a..a9ab7d7df 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -6147,3 +6147,19 @@ fn test_acl_display_symlink() { .succeeds() .stdout_matches(&re_with_acl); } + +#[test] +fn ls_emoji_alignment() { + let scene = TestScenario::new(util_name!()); + let at = &scene.fixtures; + + at.touch("a"); + at.touch("💐"); + at.touch("漢"); + scene + .ucmd() + .succeeds() + .stdout_contains("a") + .stdout_contains("💐") + .stdout_contains("漢"); +} diff --git a/tests/by-util/test_wc.rs b/tests/by-util/test_wc.rs index be3469a3f..d2007929b 100644 --- a/tests/by-util/test_wc.rs +++ b/tests/by-util/test_wc.rs @@ -799,3 +799,12 @@ fn test_args_override() { .succeeds() .stdout_is(" 5 57 302 alice_in_wonderland.txt\n"); } + +#[test] +fn wc_w_words_with_emoji_separator() { + new_ucmd!() + .args(&["-w"]) + .pipe_in("foo 💐 bar\n") + .succeeds() + .stdout_contains("3"); +}