We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f76042d commit 96322f1Copy full SHA for 96322f1
library/std/src/sys_common/wtf8/tests.rs
@@ -750,3 +750,11 @@ fn unwobbly_wtf8_plus_utf8_is_utf8() {
750
string.push_str("some utf-8");
751
assert!(string.is_known_utf8);
752
}
753
+
754
+#[test]
755
+fn unwobbly_wtf8_plus_wobbled_bytes_isnt_utf8() {
756
+ let mut string: Wtf8Buf = Wtf8Buf::from_str("hello world");
757
+ assert!(string.is_known_utf8);
758
+ string.extend_from_slice(b"\xED\xa0\x80");
759
+ assert!(!string.is_known_utf8);
760
+}
0 commit comments