Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/package_test/content_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ impl PackageContentsTest {
let mut result = Vec::new();

if target_platform.is_windows() {
// Windows is special because it requires both a `.dll` and a `.bin` file
// Windows is special because it requires both a `.dll` and either a `.lib` or a `.dll.a` file
for lib in self.lib.include_globs() {
let raw = lib.source();
if raw.ends_with(".dll") {
result.push((
raw.to_string(),
GlobSet::builder()
.add(Glob::new(&format!("Library/bin/{raw}"))?)
.add(Glob::new(&format!("Library/bin/{{,lib}}{raw}"))?)
.build()?,
));
} else if raw.ends_with(".lib") {
Expand All @@ -112,17 +112,25 @@ impl PackageContentsTest {
.add(Glob::new(&format!("Library/lib/{raw}"))?)
.build()?,
));
} else if raw.ends_with(".dll.a") {
result.push((
raw.to_string(),
GlobSet::builder()
.add(Glob::new(&format!("Library/lib/lib{raw}"))?)
.build()?,
));
} else {
result.push((
raw.to_string(),
GlobSet::builder()
.add(Glob::new(&format!("Library/bin/{raw}.dll"))?)
.add(Glob::new(&format!("Library/bin/{{,lib}}{raw}.dll"))?)
.build()?,
));
result.push((
raw.to_string(),
GlobSet::builder()
.add(Glob::new(&format!("Library/lib/{raw}.lib"))?)
.add(Glob::new(&format!("Library/lib/lib{raw}.dll.a"))?)
.build()?,
));
}
Expand Down
Loading