@@ -426,7 +426,7 @@ test_that("submit_prefetch_templates skips when cached state covers requested sp
426426 state_file <- get_prefetch_state_file(log_dir , tf_home )
427427 writeLines(c(
428428 " status: COMPLETED" ,
429- paste0(" templateflow_home: " , normalizePath (tf_home , winslash = " / " , mustWork = FALSE )),
429+ paste0(" templateflow_home: " , norm_path (tf_home , mustWork = FALSE )),
430430 " spaces: MNI152NLin2009cAsym MNI152NLin6Asym:res-2" ,
431431 " query_signature: sig-current"
432432 ), state_file )
@@ -480,7 +480,7 @@ test_that("submit_prefetch_templates resubmits when state covers spaces but mani
480480 state_file <- get_prefetch_state_file(log_dir , tf_home )
481481 writeLines(c(
482482 " status: COMPLETED" ,
483- paste0(" templateflow_home: " , normalizePath (tf_home , winslash = " / " , mustWork = FALSE )),
483+ paste0(" templateflow_home: " , norm_path (tf_home , mustWork = FALSE )),
484484 " spaces: MNI152NLin2009cAsym" ,
485485 " query_signature: sig-current"
486486 ), state_file )
@@ -535,7 +535,7 @@ test_that("submit_prefetch_templates ignores FAILED cached state from prior reru
535535 state_file <- get_prefetch_state_file(log_dir , tf_home )
536536 writeLines(c(
537537 " status: FAILED" ,
538- paste0(" templateflow_home: " , normalizePath (tf_home , winslash = " / " , mustWork = FALSE )),
538+ paste0(" templateflow_home: " , norm_path (tf_home , mustWork = FALSE )),
539539 " spaces: MNI152NLin2009cAsym" ,
540540 " scheduler_job_id: failed-job" ,
541541 " query_signature: sig-current"
@@ -596,7 +596,7 @@ test_that("submit_prefetch_templates resubmits when a new space is requested", {
596596 state_file <- get_prefetch_state_file(log_dir , tf_home )
597597 writeLines(c(
598598 " status: COMPLETED" ,
599- paste0(" templateflow_home: " , normalizePath (tf_home , winslash = " / " , mustWork = FALSE )),
599+ paste0(" templateflow_home: " , norm_path (tf_home , mustWork = FALSE )),
600600 " spaces: MNI152NLin2009cAsym" ,
601601 " query_signature: sig-old"
602602 ), state_file )
@@ -640,8 +640,8 @@ test_that("submit_prefetch_templates resubmits when a new space is requested", {
640640 expect_equal(result , " 99991" )
641641 expect_true(" prefetch_state_file" %in% names(captured_env ))
642642 expect_equal(
643- normalizePath (captured_env [[" prefetch_state_file" ]], winslash = " / " , mustWork = FALSE ),
644- normalizePath (state_file , winslash = " / " , mustWork = FALSE )
643+ norm_path (captured_env [[" prefetch_state_file" ]], mustWork = FALSE ),
644+ norm_path (state_file , mustWork = FALSE )
645645 )
646646})
647647
@@ -670,7 +670,7 @@ test_that("submit_prefetch_templates resubmits when cached manifest drifts after
670670 job_id = " job-drift" ,
671671 status = " COMPLETED" ,
672672 output_manifest = jsonlite :: toJSON(list (
673- output_dir = normalizePath (tf_home , winslash = " / " , mustWork = TRUE ),
673+ output_dir = norm_path (tf_home , mustWork = TRUE ),
674674 captured_at = " 2026-03-01T00:00:00Z" ,
675675 query_signature = " sig-current" ,
676676 file_count = 1L ,
@@ -685,7 +685,7 @@ test_that("submit_prefetch_templates resubmits when cached manifest drifts after
685685
686686 writeLines(c(
687687 " status: COMPLETED" ,
688- paste0(" templateflow_home: " , normalizePath (tf_home , winslash = " / " , mustWork = FALSE )),
688+ paste0(" templateflow_home: " , norm_path (tf_home , mustWork = FALSE )),
689689 " spaces: MNI152NLin2009cAsym" ,
690690 " scheduler_job_id: job-drift" ,
691691 " query_signature: sig-current"
@@ -744,7 +744,7 @@ test_that("submit_prefetch_templates resubmits when copied state file references
744744 state_file <- get_prefetch_state_file(log_dir , tf_home )
745745 writeLines(c(
746746 " status: COMPLETED" ,
747- paste0(" templateflow_home: " , normalizePath (previous_tf_home , winslash = " / " , mustWork = FALSE )),
747+ paste0(" templateflow_home: " , norm_path (previous_tf_home , mustWork = FALSE )),
748748 " spaces: MNI152NLin2009cAsym" ,
749749 " scheduler_job_id: copied-job" ,
750750 " query_signature: sig-current"
@@ -806,7 +806,7 @@ test_that("submit_prefetch_templates migrates legacy state file into logs and re
806806 new_state_file <- get_prefetch_state_file(log_dir , tf_home )
807807 writeLines(c(
808808 " status: COMPLETED" ,
809- paste0(" templateflow_home: " , normalizePath (tf_home , winslash = " / " , mustWork = FALSE )),
809+ paste0(" templateflow_home: " , norm_path (tf_home , mustWork = FALSE )),
810810 " spaces: MNI152NLin2009cAsym" ,
811811 " scheduler_job_id: migrated-job" ,
812812 " query_signature: sig-current"
@@ -865,14 +865,14 @@ test_that("submit_prefetch_templates prefers logs-based state when both state lo
865865 new_state_file <- get_prefetch_state_file(log_dir , tf_home )
866866 writeLines(c(
867867 " status: FAILED" ,
868- paste0(" templateflow_home: " , normalizePath (tf_home , winslash = " / " , mustWork = FALSE )),
868+ paste0(" templateflow_home: " , norm_path (tf_home , mustWork = FALSE )),
869869 " spaces: MNI152NLin2009cAsym" ,
870870 " scheduler_job_id: legacy-job" ,
871871 " query_signature: sig-current"
872872 ), legacy_state_file )
873873 writeLines(c(
874874 " status: COMPLETED" ,
875- paste0(" templateflow_home: " , normalizePath (tf_home , winslash = " / " , mustWork = FALSE )),
875+ paste0(" templateflow_home: " , norm_path (tf_home , mustWork = FALSE )),
876876 " spaces: MNI152NLin2009cAsym" ,
877877 " scheduler_job_id: logs-job" ,
878878 " query_signature: sig-current"
@@ -930,7 +930,7 @@ test_that("submit_prefetch_templates stops when legacy state cannot be removed a
930930 legacy_state_file <- get_legacy_prefetch_state_file(tf_home )
931931 writeLines(c(
932932 " status: COMPLETED" ,
933- paste0(" templateflow_home: " , normalizePath (tf_home , winslash = " / " , mustWork = FALSE )),
933+ paste0(" templateflow_home: " , norm_path (tf_home , mustWork = FALSE )),
934934 " spaces: MNI152NLin2009cAsym" ,
935935 " query_signature: sig-current"
936936 ), legacy_state_file )
@@ -985,7 +985,7 @@ test_that("submit_prefetch_templates warns when legacy state cannot be removed b
985985 legacy_state_file <- get_legacy_prefetch_state_file(tf_home )
986986 writeLines(c(
987987 " status: COMPLETED" ,
988- paste0(" templateflow_home: " , normalizePath (tf_home , winslash = " / " , mustWork = FALSE )),
988+ paste0(" templateflow_home: " , norm_path (tf_home , mustWork = FALSE )),
989989 " spaces: MNI152NLin2009cAsym" ,
990990 " query_signature: sig-current"
991991 ), legacy_state_file )
@@ -1099,7 +1099,7 @@ test_that("prefetch_manifest_verified requires exact files and matching query si
10991099 writeLines(" csf" , file_b )
11001100
11011101 manifest_json <- jsonlite :: toJSON(list (
1102- output_dir = normalizePath (tf_home , winslash = " / " , mustWork = TRUE ),
1102+ output_dir = norm_path (tf_home , mustWork = TRUE ),
11031103 captured_at = " 2026-03-01T00:00:00Z" ,
11041104 query_signature = " sig-required" ,
11051105 file_count = 2L ,
@@ -1222,8 +1222,8 @@ test_that("setup_project_directories primes check_cache with writable dirs", {
12221222 setup_project_directories(scfg , check_cache = cache )
12231223
12241224 # All created dirs should be primed in the cache
1225- scratch_key <- normalizePath (scratch_dir , winslash = " / " , mustWork = FALSE )
1226- log_key <- normalizePath (log_dir , winslash = " / " , mustWork = FALSE )
1225+ scratch_key <- norm_path (scratch_dir , mustWork = FALSE )
1226+ log_key <- norm_path (log_dir , mustWork = FALSE )
12271227
12281228 expect_true(exists(scratch_key , envir = cache , inherits = FALSE ))
12291229 expect_true(exists(log_key , envir = cache , inherits = FALSE ))
@@ -1288,7 +1288,7 @@ test_that("setup_project_directories warns and remediates unwritable directories
12881288 )
12891289
12901290 # proj_dir should be in cache (it was writable)
1291- proj_key <- normalizePath (proj_dir , winslash = " / " , mustWork = FALSE )
1291+ proj_key <- norm_path (proj_dir , mustWork = FALSE )
12921292 expect_true(exists(proj_key , envir = cache ))
12931293})
12941294
0 commit comments