From ec67d22123bf254c138585f52856e06464487d48 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Mon, 2 Dec 2024 16:04:24 +0100 Subject: [PATCH] more: adapt test to change in unicode-width --- src/uu/more/src/more.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uu/more/src/more.rs b/src/uu/more/src/more.rs index cb74e1176..61d9b2adb 100644 --- a/src/uu/more/src/more.rs +++ b/src/uu/more/src/more.rs @@ -700,15 +700,15 @@ mod tests { test_string.push_str("👩🏻‍🔬"); } - let lines = break_line(&test_string, 80); + let lines = break_line(&test_string, 31); let widths: Vec = lines .iter() .map(|s| UnicodeWidthStr::width(&s[..])) .collect(); - // Each 👩🏻‍🔬 is 6 character width it break line to the closest number to 80 => 6 * 13 = 78 - assert_eq!((78, 42), (widths[0], widths[1])); + // Each 👩🏻‍🔬 is 2 character width, break line to the closest even number to 31 + assert_eq!((30, 10), (widths[0], widths[1])); } #[test]