diff --git a/crates/oak-render/src/cache.rs b/crates/oak-render/src/cache.rs index c633d7654..eaf3c1f99 100644 --- a/crates/oak-render/src/cache.rs +++ b/crates/oak-render/src/cache.rs @@ -1147,7 +1147,13 @@ mod tests { let mut with_tb = tb_cache(); with_tb.validate(TimeRange::new(Rational::new(0, 1), Rational::new(16, 1))); let name = with_tb.frame_filename(Rational::new(15, 1)).expect("cached"); - assert!(name.ends_with("/450"), "{name}"); + assert_eq!( + std::path::Path::new(&name) + .file_name() + .and_then(|n| n.to_str()), + Some("450"), + "{name}" + ); let path = PlaybackCache::frame_cache_path( "/cache", @@ -1180,7 +1186,13 @@ mod tests { c.set_saving_enabled(false); c.validate(TimeRange::new(Rational::new(0, 1), Rational::new(4, 1))); let name = c.frame_filename(Rational::new(1, 2)).expect("cached"); - assert!(name.ends_with("/1"), "{name}"); + assert_eq!( + std::path::Path::new(&name) + .file_name() + .and_then(|n| n.to_str()), + Some("1"), + "{name}" + ); assert!(name.contains(c.uuid()), "{name}"); } diff --git a/crates/oak-render/src/procpool.rs b/crates/oak-render/src/procpool.rs index 877e099ba..86cf932af 100644 --- a/crates/oak-render/src/procpool.rs +++ b/crates/oak-render/src/procpool.rs @@ -4737,10 +4737,13 @@ mod tests { #[test] fn find_real_worker_honors_existing_env_override() { let _lock = pool_test_lock(); - let _env = EnvRestore::set("OAK_WORKER_BIN", "/bin/sh"); + // The override must name a file that exists on every platform + // (`/bin/sh` never does on Windows): the test's own executable. + let worker = std::env::current_exe().expect("test executable"); + let _env = EnvRestore::set("OAK_WORKER_BIN", worker.to_string_lossy().as_ref()); assert_eq!( find_real_worker().as_deref(), - Some(std::path::Path::new("/bin/sh")), + Some(worker.as_path()), "an existing OAK_WORKER_BIN wins over the sibling probe" ); }