diff options
| author | bors <bors@rust-lang.org> | 2018-05-21 23:26:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-21 23:26:32 +0000 |
| commit | 65a16c000720f286c91747b91e6d9caa7b1bb63c (patch) | |
| tree | dac2c0cbe77971b03cd52bc44f4d20ae9f0b7bcf /src/libcore/tests | |
| parent | cb20f68d0f9e1c1bf49df22991b5a0d1a43146e8 (diff) | |
| parent | b6539372e9d4dddb1c9f8c894f23bd4c3e8d9489 (diff) | |
| download | rust-65a16c000720f286c91747b91e6d9caa7b1bb63c.tar.gz rust-65a16c000720f286c91747b91e6d9caa7b1bb63c.zip | |
Auto merge of #49283 - varkor:combining-chars-escape_debug, r=SimonSapin
Escape combining characters in char::Debug Although combining characters are technically printable, they make little sense to print on their own with `Debug`: it'd be better to escape them like non-printable characters. This is a breaking change, but I imagine the fact `escape_debug` is rare and almost certainly primarily used for debugging that this is an acceptable change. Resolves #41922. r? @alexcrichton cc @clarcharr
Diffstat (limited to 'src/libcore/tests')
| -rw-r--r-- | src/libcore/tests/char.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcore/tests/char.rs b/src/libcore/tests/char.rs index ab90763abf8..d2a9ed75be6 100644 --- a/src/libcore/tests/char.rs +++ b/src/libcore/tests/char.rs @@ -181,6 +181,7 @@ fn test_escape_debug() { assert_eq!(string('\u{ff}'), "\u{ff}"); assert_eq!(string('\u{11b}'), "\u{11b}"); assert_eq!(string('\u{1d4b6}'), "\u{1d4b6}"); + assert_eq!(string('\u{301}'), "\\u{301}"); // combining character assert_eq!(string('\u{200b}'),"\\u{200b}"); // zero width space assert_eq!(string('\u{e000}'), "\\u{e000}"); // private use 1 assert_eq!(string('\u{100000}'), "\\u{100000}"); // private use 2 |
