Skip to content

Commit 2b18679

Browse files
committed
Normalize paths in find_pkg_dir tests for consistent comparison
1 parent 41019ad commit 2b18679

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/testthat/test-remote.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ test_that("find_pkg_dir finds package directory correctly", {
207207

208208
# Should find the subdirectory
209209
found <- find_pkg_dir(temp_dir, NULL)
210-
expect_equal(found, pkg_dir)
210+
expect_equal(normalizePath(found), normalizePath(pkg_dir))
211211

212212
# Cleanup
213213
unlink(temp_dir, recursive = TRUE)
@@ -221,7 +221,7 @@ test_that("find_pkg_dir handles specified subdirectory", {
221221
writeLines("Package: pkg", file.path(sub_dir, "DESCRIPTION"))
222222

223223
found <- find_pkg_dir(temp_dir, "nested/pkg")
224-
expect_equal(found, sub_dir)
224+
expect_equal(normalizePath(found), normalizePath(sub_dir))
225225

226226
unlink(temp_dir, recursive = TRUE)
227227
})

0 commit comments

Comments
 (0)