fix: modify ut logic which is incorrect under macOS (#1099)
Signed-off-by: cormick <cormick1080@gmail.com>
This commit is contained in:
parent
cfab09f4c0
commit
ad335784fe
|
|
@ -436,9 +436,15 @@ mod tests {
|
||||||
|
|
||||||
let result = BackendFactory::new(Some(&plugin_dir));
|
let result = BackendFactory::new(Some(&plugin_dir));
|
||||||
assert!(result.is_err());
|
assert!(result.is_err());
|
||||||
assert_eq!(
|
let err_msg = format!("{}", result.err().unwrap());
|
||||||
format!("{}", result.err().unwrap()),
|
|
||||||
format!("PluginError cause: {}: file too short", lib_path.display()),
|
assert!(
|
||||||
|
err_msg.starts_with("PluginError cause:"),
|
||||||
|
"error message should start with 'PluginError cause:'"
|
||||||
|
);
|
||||||
|
assert!(
|
||||||
|
err_msg.contains(&lib_path.display().to_string()),
|
||||||
|
"error message should contain library path"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue