Skip to content

Commit ebffedd

Browse files
xNxExOxmeithecatte
authored andcommitted
Implement UI tests without Unix-specific APIs
1 parent f813ea1 commit ebffedd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test_suite/ui_tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use glob::glob;
2-
use std::os::unix::ffi::OsStrExt;
32

43
#[test]
54
fn ui() {
65
let t = trybuild::TestCases::new();
76
for test in glob("ui/*.rs").unwrap() {
87
let path = test.unwrap();
9-
match path.as_os_str().as_bytes() {
10-
b"ui/must_use_warning.rs" => t.pass(path),
11-
_ => t.compile_fail(path),
8+
if path == std::path::Path::new("ui/must_use_warning.rs") {
9+
t.pass(path)
10+
} else {
11+
t.compile_fail(path)
1212
}
1313
}
1414
}

0 commit comments

Comments
 (0)