diff options
| author | blake2-ppc <blake2-ppc> | 2013-07-30 19:10:54 +0200 |
|---|---|---|
| committer | blake2-ppc <blake2-ppc> | 2013-07-30 19:16:12 +0200 |
| commit | aa89325cb01308f48b134f199a99c6d2f4e0bfe9 (patch) | |
| tree | 7f73191937606a763d409e8935d857a57ffd820a /src/libstd | |
| parent | b4ff95599a05da66d2ba0955cc7ae33dd6bfe7fe (diff) | |
| download | rust-aa89325cb01308f48b134f199a99c6d2f4e0bfe9.tar.gz rust-aa89325cb01308f48b134f199a99c6d2f4e0bfe9.zip | |
std: Add from_bytes test for utf-8 using codepoints above 0xffff
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/str.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 9695bd16be3..fafd2ecf7a5 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -2825,7 +2825,10 @@ mod tests { 0x20_u8, 0x4e_u8, 0x61_u8, 0x6d_u8]; + assert_eq!(ss, from_bytes(bb)); + assert_eq!(~"ππππππΰΈΰΈ£Ψ―ΩΩΨ© Ψ§ΩΩΩΩΨͺΰΈΰΈ¨ΰΉΰΈΰΈ’δΈεπ πΏπ»ππΉπ»π°", + from_bytes(bytes!("ππππππΰΈΰΈ£Ψ―ΩΩΨ© Ψ§ΩΩΩΩΨͺΰΈΰΈ¨ΰΉΰΈΰΈ’δΈεπ πΏπ»ππΉπ»π°"))); } #[test] |
