From 086e71eb47843f3e95570b2eb84585f8a765be10 Mon Sep 17 00:00:00 2001 From: Colin Rofls Date: Wed, 25 Oct 2023 12:48:46 -0400 Subject: [PATCH] Fixup test path discovery --- fea-rs/src/util/ttx.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fea-rs/src/util/ttx.rs b/fea-rs/src/util/ttx.rs index ceb0194a3..68bf24656 100644 --- a/fea-rs/src/util/ttx.rs +++ b/fea-rs/src/util/ttx.rs @@ -510,7 +510,8 @@ pub(crate) fn fonttools_test_glyph_order() -> GlyphMap { let cwd = std::env::current_dir().expect("could not retrieve current directory"); // hack: during testing cwd is the crate root, but when running a binary // it may be the project root - let path = if cwd.parent().expect("always present").ends_with("fea-rs") { + let path = if cwd.ends_with("fea-rs") { + assert!(!cwd.parent().expect("always presnt").ends_with("fea-rs")); "./test-data/simple_glyph_order.txt" } else { "./fea-rs/test-data/simple_glyph_order.txt"