Skip to content

Commit ae967ee

Browse files
authored
normalize path for comparaison in test (#1196)
fix tests following afadf50
1 parent afadf50 commit ae967ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/testthat/test-site.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
test_that("find_book_proj() correction found the root dir", {
2-
book_dir <- local_book()
2+
book_dir <- xfun::normalize_path(local_book())
33
withr::local_dir(book_dir)
4-
expect_equal(normalizePath(find_book_proj(".")), book_dir)
5-
expect_equal(normalizePath(find_book_proj("01-Introduction.Rmd")), book_dir)
4+
expect_equal(find_book_proj("."), book_dir)
5+
expect_equal(find_book_proj("01-Introduction.Rmd"), book_dir)
66
gsub("^(site:.*)$", "\\1 # any comment", xfun::read_utf8("index.Rmd"))
77
xfun::gsub_file("index.Rmd", pattern = "^(site:.*)$", replacement = "\\1 # any comment")
8-
expect_equal(normalizePath(find_book_proj(".")), book_dir)
8+
expect_equal(find_book_proj("."), book_dir)
99
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy