Skip to content

Commit 6fae45d

Browse files
committed
add mingw globs
1 parent c1ef266 commit 6fae45d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/package_test/content_test.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ impl PackageContentsTest {
9595
let mut result = Vec::new();
9696

9797
if target_platform.is_windows() {
98-
// Windows is special because it requires both a `.dll` and a `.bin` file
98+
// Windows is special because it requires both a `.dll` and either a `.lib` or a `.dll.a` file
9999
for lib in self.lib.include_globs() {
100100
let raw = lib.source();
101101
if raw.ends_with(".dll") {
102102
result.push((
103103
raw.to_string(),
104104
GlobSet::builder()
105-
.add(Glob::new(&format!("Library/bin/{raw}"))?)
105+
.add(Glob::new(&format!("Library/bin/{{,lib}}{raw}"))?)
106106
.build()?,
107107
));
108108
} else if raw.ends_with(".lib") {
@@ -112,17 +112,25 @@ impl PackageContentsTest {
112112
.add(Glob::new(&format!("Library/lib/{raw}"))?)
113113
.build()?,
114114
));
115+
} else if raw.ends_with(".dll.a") {
116+
result.push((
117+
raw.to_string(),
118+
GlobSet::builder()
119+
.add(Glob::new(&format!("Library/lib/lib{raw}"))?)
120+
.build()?,
121+
));
115122
} else {
116123
result.push((
117124
raw.to_string(),
118125
GlobSet::builder()
119-
.add(Glob::new(&format!("Library/bin/{raw}.dll"))?)
126+
.add(Glob::new(&format!("Library/bin/{{,lib}}{raw}.dll"))?)
120127
.build()?,
121128
));
122129
result.push((
123130
raw.to_string(),
124131
GlobSet::builder()
125132
.add(Glob::new(&format!("Library/lib/{raw}.lib"))?)
133+
.add(Glob::new(&format!("Library/lib/lib{raw}.dll.a"))?)
126134
.build()?,
127135
));
128136
}

0 commit comments

Comments
 (0)