]> git.lizzy.rs Git - rust.git/blob - library/std/src/sys/unix/os_str/tests.rs
Merge commit '8f1ebdd18bdecc621f16baaf779898cc08cc2766' into clippyup
[rust.git] / library / std / src / sys / unix / os_str / tests.rs
1 use super::*;
2
3 #[test]
4 fn slice_debug_output() {
5     let input = Slice::from_u8_slice(b"\xF0hello,\tworld");
6     let expected = r#""\xF0hello,\tworld""#;
7     let output = format!("{input:?}");
8
9     assert_eq!(output, expected);
10 }
11
12 #[test]
13 fn display() {
14     assert_eq!(
15         "Hello\u{FFFD}\u{FFFD} There\u{FFFD} Goodbye",
16         Slice::from_u8_slice(b"Hello\xC0\x80 There\xE6\x83 Goodbye").to_string(),
17     );
18 }