about summary refs log tree commit diff
path: root/library/coretests
diff options
context:
space:
mode:
authorChristian Poveda <christian.poveda@ferrous-systems.com>2025-09-12 11:10:45 -0500
committerChristian Poveda <christian.poveda@ferrous-systems.com>2025-09-16 10:05:40 -0500
commite652f97c6b71d485473c98bb0e5be1328db9bc45 (patch)
treec4156e788fe30017167401a32f0f2cfd35f484e1 /library/coretests
parent408eacfb95ea19e248c0fe5e377980bc00682c1b (diff)
downloadrust-e652f97c6b71d485473c98bb0e5be1328db9bc45.tar.gz
rust-e652f97c6b71d485473c98bb0e5be1328db9bc45.zip
Improve `core::ascii` coverage
Diffstat (limited to 'library/coretests')
-rw-r--r--library/coretests/tests/ascii.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/coretests/tests/ascii.rs b/library/coretests/tests/ascii.rs
index ce09ee507f1..297aa114e00 100644
--- a/library/coretests/tests/ascii.rs
+++ b/library/coretests/tests/ascii.rs
@@ -505,3 +505,10 @@ fn test_escape_ascii_iter() {
     let _ = it.advance_back_by(4);
     assert_eq!(it.to_string(), r#"fastpath\xffremainder"#);
 }
+
+#[test]
+fn test_invalid_u8() {
+    for c in 128..=255 {
+        assert_eq!(core::ascii::Char::from_u8(c), None);
+    }
+}