Skip to content

Commit

Permalink
test more themes (#707)
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Sep 16, 2022
1 parent 1f2d1b9 commit 369c10f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test-ci/test-themes.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ test_site = function(theme) {
dir.create(d1 <- tempfile())
on.exit(unlink(d1, recursive = TRUE), add = TRUE)
d2 = new_site(d1, theme = theme)
xfun::in_dir(d2, blogdown::build_site(build_rmd = 'newfile'))
xfun::normalize_path(d1) %==% xfun::normalize_path(d2)
}

assert('new_site() works', {
assert('new_site() and build_site() work with selected themes', {
themes = c(
'hugo-apero/hugo-apero',
sprintf('wowchemy/starter-hugo-%s', c('academic', 'online-course', 'research-group')),
sprintf('yihui/hugo-%s', c('lithium', 'prose', 'xmag', 'xmin'))
)
(test_site('yihui/hugo-xmin'))
})

0 comments on commit 369c10f

Please sign in to comment.