mirror of
https://github.com/rust-lang/cargo
synced 2024-10-02 14:04:23 +00:00
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.
This commit is contained in:
parent
e931e4796b
commit
4d82360249
|
@ -393,6 +393,11 @@ fn test_progress_status() {
|
|||
format.progress_status(3, 4, ":每個漢字佔據了兩個字元"),
|
||||
Some("[=============> ] 3/4:每個漢字佔據了...".to_string())
|
||||
);
|
||||
assert_eq!(
|
||||
// handle breaking at middle of character
|
||||
format.progress_status(3, 4, ":-每個漢字佔據了兩個字元"),
|
||||
Some("[=============> ] 3/4:-每個漢字佔據了...".to_string())
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue