Skip to content

Commit 66e0154

Browse files
committed
Update Luau+windows require dylib failed test
1 parent 93b505c commit 66e0154

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/luau.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ fn test_require() -> Result<()> {
7171
.set("cpath", temp_dir.path().join("?.so").to_string_lossy())?;
7272
fs::write(temp_dir.path().join("dylib.so"), "")?;
7373
match lua.load("require('dylib')").exec() {
74-
Err(Error::RuntimeError(e))
75-
if e.contains("module 'dylib' not found")
76-
&& e.contains("dynamic libraries are disabled in safe mode") => {}
74+
Err(Error::RuntimeError(e)) if cfg!(unix) && e.contains("module 'dylib' not found") => {
75+
assert!(e.contains("dynamic libraries are disabled in safe mode"))
76+
}
77+
Err(Error::RuntimeError(e)) if e.contains("module 'dylib' not found") => {}
7778
r => panic!("expected RuntimeError(...) with a specific message, got {r:?}"),
7879
}
7980

0 commit comments

Comments
 (0)