diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2016-11-18 13:59:44 +0100 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2016-11-18 14:45:59 +0100 |
| commit | d0bb7e194639e270f69059fb440ed7b14d525abd (patch) | |
| tree | 520f2ef8c6a049da9bbae313847e279464b3742e /src/libcoretest | |
| parent | 01d061fdc04ed78ff65138e96c212ecc678a9f8f (diff) | |
| download | rust-d0bb7e194639e270f69059fb440ed7b14d525abd.tar.gz rust-d0bb7e194639e270f69059fb440ed7b14d525abd.zip | |
Fix `fmt::Debug` for strings, e.g. for Chinese characters
The problem occured due to lines like ``` 3400;<CJK Ideograph Extension A, First>;Lo;0;L;;;;;N;;;;; 4DB5;<CJK Ideograph Extension A, Last>;Lo;0;L;;;;;N;;;;; ``` in `UnicodeData.txt`, which the script previously interpreted as two characters, although it represents the whole range. Fixes #34318.
Diffstat (limited to 'src/libcoretest')
| -rw-r--r-- | src/libcoretest/char.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcoretest/char.rs b/src/libcoretest/char.rs index 7da0b6902f2..b4088ffbf89 100644 --- a/src/libcoretest/char.rs +++ b/src/libcoretest/char.rs @@ -162,6 +162,8 @@ fn test_escape_debug() { assert_eq!(s, "~"); let s = string('é'); assert_eq!(s, "é"); + let s = string('文'); + assert_eq!(s, "文"); let s = string('\x00'); assert_eq!(s, "\\u{0}"); let s = string('\x1f'); |
