From 1527fb61b9352c15d87ebcbc6f786baa2d390bcd Mon Sep 17 00:00:00 2001 From: Javier Alvarez Date: Wed, 23 Dec 2020 16:31:04 +0100 Subject: [PATCH] Fix case-sensitive extension check --- tests/compile-test.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/compile-test.rs b/tests/compile-test.rs index ec3af94b9ca..2b4ecc73150 100644 --- a/tests/compile-test.rs +++ b/tests/compile-test.rs @@ -44,7 +44,9 @@ fn third_party_crates() -> String { }; if let Some(name) = path.file_name().and_then(OsStr::to_str) { for dep in CRATES { - if name.starts_with(&format!("lib{}-", dep)) && name.ends_with(".rlib") { + if name.starts_with(&format!("lib{}-", dep)) + && name.rsplit('.').next().map(|ext| ext.eq_ignore_ascii_case("rlib")) == Some(true) + { if let Some(old) = crates.insert(dep, path.clone()) { panic!("Found multiple rlibs for crate `{}`: `{:?}` and `{:?}", dep, old, path); }