Skip to content

Commit 750eee7

Browse files
committed
add mingw globs
1 parent c1ef266 commit 750eee7

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

src/package_test/content_test.rs

Lines changed: 16 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,11 +112,18 @@ 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((
@@ -125,6 +132,12 @@ impl PackageContentsTest {
125132
.add(Glob::new(&format!("Library/lib/{raw}.lib"))?)
126133
.build()?,
127134
));
135+
result.push((
136+
raw.to_string(),
137+
GlobSet::builder()
138+
.add(Glob::new(&format!("Library/lib/lib{raw}.dll.a"))?)
139+
.build()?,
140+
));
128141
}
129142
}
130143
} else {

0 commit comments

Comments
 (0)