diff --git a/tests/modern_career_files_tests.cpp b/tests/modern_career_files_tests.cpp index f78994e..7ec7391 100644 --- a/tests/modern_career_files_tests.cpp +++ b/tests/modern_career_files_tests.cpp @@ -8,7 +8,9 @@ namespace { void require(bool ok,const char *why){if(!ok)throw std::runtime_error(why);} template void rejected(F f,const char *why){bool caught=false;try{f();}catch(const std::exception&){caught=true;}require(caught,why);} struct Fixture { - fs::path root=fs::temp_directory_path()/("modern-career-files-"+std::to_string(std::chrono::steady_clock::now().time_since_epoch().count())); + // macOS exposes its temporary directory through the system /var alias. + // Resolve the trusted OS root; deliberate library/file links are still rejected below. + fs::path root=fs::canonical(fs::temp_directory_path())/("modern-career-files-"+std::to_string(std::chrono::steady_clock::now().time_since_epoch().count())); Fixture(){fs::create_directories(root);} ~Fixture(){std::error_code e;fs::remove_all(root,e);} };