From 2addff171afa77a45cf209506736070d99325550 Mon Sep 17 00:00:00 2001 From: Ivan Ukhov Date: Mon, 20 May 2024 11:20:37 +0200 Subject: [PATCH] Revisit the external tests --- Makefile | 8 +------- src/bin/support/mod.rs | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index a8db8b3..6accb15 100644 --- a/Makefile +++ b/Makefile @@ -26,9 +26,6 @@ test-name-external: --exclude google-fonts/ofl/bungeecolor \ --exclude google-fonts/ofl/bungeespice \ --exclude google-fonts/ofl/gentiumbookbasic \ - --exclude google-fonts/ofl/gruppo \ - --exclude google-fonts/ofl/iceland \ - --exclude google-fonts/ofl/kaushanscript \ --exclude google-fonts/ufl/ubuntu \ --exclude web-platform-tests/css/WOFF2/support/SFNT-CFF-Fallback \ --exclude web-platform-tests/css/WOFF2/support/SFNT-CFF-Reference \ @@ -65,12 +62,9 @@ test-vectorize-external: # https://github.com/google/fonts/issues/5551 # https://github.com/google/fonts/issues/5724 cargo run --bin founder-vectorize -- \ - --path ../tests/fixtures/external \ + --path tests/fixtures/external \ --exclude google-fonts/ofl/bungeecolor \ --exclude google-fonts/ofl/bungeespice \ - --exclude google-fonts/ofl/gruppo \ - --exclude google-fonts/ofl/iceland \ - --exclude google-fonts/ofl/kaushanscript \ --exclude google-fonts/ufl/ubuntu \ --exclude web-platform-tests/css/WOFF2/support/SFNT-CFF-Fallback \ --exclude web-platform-tests/css/WOFF2/support/SFNT-CFF-Reference \ diff --git a/src/bin/support/mod.rs b/src/bin/support/mod.rs index c05de2e..b7a5754 100644 --- a/src/bin/support/mod.rs +++ b/src/bin/support/mod.rs @@ -3,7 +3,7 @@ use std::path::{Path, PathBuf}; pub fn filter(path: &Path, includes: &[&str], excludes: &[&str]) -> bool { let path = path.to_str().unwrap(); - includes.iter().any(|value| path.contains(value)) + includes.iter().any(|value| path.ends_with(value)) && !excludes.iter().any(|value| path.contains(value)) }