| #' @keywords internal | #' @keywords internal | ||||
| call_write_xaringan_theme <- function() { | call_write_xaringan_theme <- function() { | ||||
| paste0("write_xaringan_theme(", | paste0("write_xaringan_theme(", | ||||
| paste(template_variables$variable, collapse = ", "), | |||||
| ", extra_css, outfile", | |||||
| paste(names(formals(write_xaringan_theme)), collapse = ", "), | |||||
| ")") | ")") | ||||
| } | } | ||||
| context("test-write_xaringan_theme") | |||||
| test_that("write_xaringan_theme() writes to specified outfile", { | |||||
| tmpfile <- tempfile(fileext = ".css") | |||||
| expect_equal(duo_accent(outfile = tmpfile), tmpfile) | |||||
| expect_true(file.exists(tmpfile)) | |||||
| expect_true(grepl("xaringanthemer", readLines(tmpfile)[3])) | |||||
| }) |