swh:1:snp:bdc19e867479541d0f4994ceaa711217d0dc28ed
Tip revision: 74b598025322cd572dcd58326f0c5fb465f503ab authored by Hadley Wickham on 23 June 2022, 13:00:02 UTC
version 2.0.5
version 2.0.5
Tip revision: 74b5980
test-build-logo.R
test_that("can handle logo in subdir", {
src <- withr::local_tempdir()
dst <- withr::local_tempdir()
dir_create(path(src, "man", "figures"))
file_create(path(src, "man", "figures", "logo.svg"))
pkg <- structure(list(src_path = src, dst_path = dst), class = "pkgdown")
expect_true(has_logo(pkg))
expect_snapshot(copy_logo(pkg))
expect_true(file_exists(path(dst, "logo.svg")))
expect_equal(logo_path(pkg, 0), "logo.svg")
expect_equal(logo_path(pkg, 1), "../logo.svg")
})