@@ -33,18 +33,24 @@ test_that("all fitting methods work with output_dir", {
3333 # from the original tempdir(), so need to normalise both for comparison
3434 expect_equal(normalizePath(fit $ runset $ args $ output_dir ),
3535 normalizePath(method_dir ))
36- files <- list.files(method_dir , full.names = TRUE )
36+ files <- normalizePath( list.files(method_dir , full.names = TRUE ) )
3737 # in 2.34.0 we also save the config files for all methods and the metric
3838 # for sample
3939 if (cmdstan_version() < " 2.34.0" ) {
4040 mult <- 1
4141 } else if (method == " sample" ) {
4242 mult <- 3
43- expect_equal(repair_path(files [grepl(" metric" , files )]), fit $ metric_files())
44- expect_equal(repair_path(files [grepl(" config" , files )]), fit $ config_files())
43+ expect_equal(files [grepl(" metric" , files )],
44+ normalizePath(sapply(fit $ metric_files(), wsl_safe_path , revert = TRUE ,
45+ USE.NAMES = FALSE )))
46+ expect_equal(files [grepl(" config" , files )],
47+ normalizePath(sapply(fit $ config_files(), wsl_safe_path , revert = TRUE ,
48+ USE.NAMES = FALSE )))
4549 } else {
4650 mult <- 2
47- expect_equal(repair_path(files [grepl(" config" , files )]), fit $ config_files())
51+ expect_equal(files [grepl(" config" , files )],
52+ normalizePath(sapply(fit $ config_files(), wsl_safe_path , revert = TRUE ,
53+ USE.NAMES = FALSE )))
4854 }
4955 expect_equal(length(list.files(method_dir )), mult * fit $ num_procs())
5056
0 commit comments