about summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2016-11-18 13:59:44 +0100
committerTobias Bucher <tobiasbucher5991@gmail.com>2016-11-18 14:45:59 +0100
commitd0bb7e194639e270f69059fb440ed7b14d525abd (patch)
tree520f2ef8c6a049da9bbae313847e279464b3742e /src/libcoretest
parent01d061fdc04ed78ff65138e96c212ecc678a9f8f (diff)
downloadrust-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.rs2
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');