Skip to content

Commit 1b5e061

Browse files
authored
Merge pull request #96 from bmatcuk/master
Fixes #95 - multiple version numbers
2 parents 3fc2a56 + a36b915 commit 1b5e061

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ impl Library {
575575
}
576576

577577
fn parse_modversion(&mut self, output: &str) {
578-
self.version.push_str(output.trim());
578+
self.version.push_str(output.lines().nth(0).unwrap().trim());
579579
}
580580
}
581581

@@ -681,6 +681,12 @@ fn system_library_mac_test() {
681681
"png16",
682682
&[PathBuf::from("/usr/local/lib")]
683683
));
684+
685+
let libpng = Config::new()
686+
.range_version("1".."99")
687+
.probe("libpng16")
688+
.unwrap();
689+
assert!(libpng.version.find('\n').is_none());
684690
}
685691
}
686692

0 commit comments

Comments
 (0)