diff --git a/src/lib.rs b/src/lib.rs
index 06bc4df..eed40f8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2146,6 +2146,7 @@ mod tests {
     }
 
     #[test]
+    #[cfg(feature = "std")]
     #[cfg_attr(miri, ignore)] // Miri is too slow for this test
     fn test_all_utf8_char_in_paths() {
         // two code points
