diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 57b3dc3a25249..f5bd7e75c3aa6 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -3618,6 +3618,18 @@ mod tests { assert!(!" _ ".is_whitespace()); } + #[test] + fn test_slice_shift_char() { + let data = "ประเทศไทย中"; + assert_eq!(data.slice_shift_char(), (Some('ป'), "ระเทศไทย中")); + } + + #[test] + fn test_slice_shift_char_2() { + let empty = ""; + assert_eq!(empty.slice_shift_char(), (None, "")); + } + #[test] fn test_push_byte() { let mut s = ~"ABC";