We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
require
1 parent 93b505c commit 66e0154Copy full SHA for 66e0154
tests/luau.rs
@@ -71,9 +71,10 @@ fn test_require() -> Result<()> {
71
.set("cpath", temp_dir.path().join("?.so").to_string_lossy())?;
72
fs::write(temp_dir.path().join("dylib.so"), "")?;
73
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") => {}
+ Err(Error::RuntimeError(e)) if cfg!(unix) && e.contains("module 'dylib' not found") => {
+ assert!(e.contains("dynamic libraries are disabled in safe mode"))
+ }
77
+ Err(Error::RuntimeError(e)) if e.contains("module 'dylib' not found") => {}
78
r => panic!("expected RuntimeError(...) with a specific message, got {r:?}"),
79
}
80
0 commit comments