diff options
Diffstat (limited to 'src/test/run-pass/lib-str.rs')
| -rw-r--r-- | src/test/run-pass/lib-str.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/run-pass/lib-str.rs b/src/test/run-pass/lib-str.rs index 52f0f51b..e1e4abb1 100644 --- a/src/test/run-pass/lib-str.rs +++ b/src/test/run-pass/lib-str.rs @@ -89,6 +89,16 @@ fn test_connect() { t(vec("hi"), " ", "hi"); } +fn test_to_upper() { + // to_upper doesn't understand unicode yet, + // but we need to at least preserve it + auto unicode = "\u65e5\u672c"; + auto input = "abcDEF" + unicode + "xyz:.;"; + auto expected = "ABCDEF" + unicode + "XYZ:.;"; + auto actual = _str.to_upper(input); + check (_str.eq(expected, actual)); +} + fn main() { test_bytes_len(); @@ -98,4 +108,5 @@ fn main() { test_substr(); test_concat(); test_connect(); + test_to_upper(); } |