Skip to content

Commit 712adca

Browse files
quality of impl wtf8buf
1 parent 3ebe62b commit 712adca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

library/std/src/sys_common/wtf8/tests.rs

+8
Original file line numberDiff line numberDiff line change
@@ -758,3 +758,11 @@ fn unwobbly_wtf8_plus_wobbled_bytes_isnt_utf8() {
758758
string.extend_from_slice(b"\xED\xa0\x80");
759759
assert!(!string.is_known_utf8);
760760
}
761+
762+
#[test]
763+
fn unwobbly_wtf8_plus_unwobbly_bytes_is_utf8() {
764+
let mut string: Wtf8Buf = Wtf8Buf::from_str("hello world");
765+
assert!(string.is_known_utf8);
766+
string.extend_from_slice(b"some utf-8");
767+
assert!(string.is_known_utf8);
768+
}

0 commit comments

Comments
 (0)