summaryrefslogtreecommitdiffstats
path: root/library/std/src/sys/unix/os_str/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys/unix/os_str/tests.rs')
-rw-r--r--library/std/src/sys/unix/os_str/tests.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/os_str/tests.rs b/library/std/src/sys/unix/os_str/tests.rs
index 213277f01..22ba0c923 100644
--- a/library/std/src/sys/unix/os_str/tests.rs
+++ b/library/std/src/sys/unix/os_str/tests.rs
@@ -8,3 +8,11 @@ fn slice_debug_output() {
assert_eq!(output, expected);
}
+
+#[test]
+fn display() {
+ assert_eq!(
+ "Hello\u{FFFD}\u{FFFD} There\u{FFFD} Goodbye",
+ Slice::from_u8_slice(b"Hello\xC0\x80 There\xE6\x83 Goodbye").to_string(),
+ );
+}