Skip to content

Commit 1a8692d

Browse files
committed
Auto merge of #9515 - pickfire:patch-1, r=ehuss
Add additional test for CJK progress width Not clear if CJK test hit boundary, since CJK characters have double width, if we show an example with an extra single width means one of them hit character boundary to be able to test ellipsis handling.
2 parents 71c1760 + 4d82360 commit 1a8692d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cargo/util/progress.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,11 @@ fn test_progress_status() {
393393
format.progress_status(3, 4, ":每個漢字佔據了兩個字元"),
394394
Some("[=============> ] 3/4:每個漢字佔據了...".to_string())
395395
);
396+
assert_eq!(
397+
// handle breaking at middle of character
398+
format.progress_status(3, 4, ":-每個漢字佔據了兩個字元"),
399+
Some("[=============> ] 3/4:-每個漢字佔據了...".to_string())
400+
);
396401
}
397402

398403
#[test]

0 commit comments

Comments
 (0)