Skip to content

Commit f864772

Browse files
authored
Merge pull request #122 from kornelski/mactest
Fix test on macOS
2 parents 528d34b + 15ef972 commit f864772

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -677,23 +677,25 @@ fn split_flags(output: &[u8]) -> Vec<String> {
677677
#[test]
678678
#[cfg(target_os = "macos")]
679679
fn system_library_mac_test() {
680+
use std::path::Path;
681+
680682
let system_roots = vec![PathBuf::from("/Library"), PathBuf::from("/System")];
681683

682684
assert!(!is_static_available(
683685
"PluginManager",
684-
system_roots,
686+
&system_roots,
685687
&[PathBuf::from("/Library/Frameworks")]
686688
));
687689
assert!(!is_static_available(
688690
"python2.7",
689-
system_roots,
691+
&system_roots,
690692
&[PathBuf::from(
691693
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config"
692694
)]
693695
));
694696
assert!(!is_static_available(
695697
"ffi_convenience",
696-
system_roots,
698+
&system_roots,
697699
&[PathBuf::from(
698700
"/Library/Ruby/Gems/2.0.0/gems/ffi-1.9.10/ext/ffi_c/libffi-x86_64/.libs"
699701
)]
@@ -703,7 +705,7 @@ fn system_library_mac_test() {
703705
if Path::new("/usr/local/lib/libpng16.a").exists() {
704706
assert!(is_static_available(
705707
"png16",
706-
system_roots,
708+
&system_roots,
707709
&[PathBuf::from("/usr/local/lib")]
708710
));
709711

0 commit comments

Comments
 (0)