From 3cf333f3aeaf8fa309931518bae9565b2bf13d6c Mon Sep 17 00:00:00 2001 From: Christof Petig Date: Sat, 2 Nov 2024 23:04:19 +0100 Subject: [PATCH] fix strings test (both old and new API) --- tests/runtime/main.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/runtime/main.rs b/tests/runtime/main.rs index a939ec18a..6afeec4cf 100644 --- a/tests/runtime/main.rs +++ b/tests/runtime/main.rs @@ -272,7 +272,12 @@ fn tests(name: &str, dir_name: &str) -> Result> { let (resolve, world) = resolve_wit_dir(&dir); for path in cpp.iter() { let world_name = &resolve.worlds[world].name; - let out_dir = out_dir.join(format!("cpp-{}", world_name)); + let out_dir = out_dir.join(format!( + "cpp-{}", + path.file_name() + .and_then(|os| os.to_str()) + .unwrap_or(world_name) + )); drop(fs::remove_dir_all(&out_dir)); fs::create_dir_all(&out_dir).unwrap();