tests/testthat/test-xlsx_color_theme.R

context("xlsx_color_theme")

library(tibble)

test_that("xlsx_color_theme() and its British alias work", {
  expect_equal(xlsx_color_theme("./examples.xlsx"),
               tribble(       ~name,       ~rgb,
                      "background1", "FFFFFFFF",
                            "text1", "FF000000",
                      "background2", "FFEEECE1",
                            "text2", "FF1F497D",
                          "accent1", "FF4F81BD",
                          "accent2", "FFC0504D",
                          "accent3", "FF9BBB59",
                          "accent4", "FF8064A2",
                          "accent5", "FF4BACC6",
                          "accent6", "FFF79646",
                        "hyperlink", "FF0000FF",
               "followed-hyperlink", "FF800080"))
})

Try the tidyxl package in your browser

Any scripts or data that you put into this service are public.

tidyxl documentation built on Nov. 2, 2023, 5:11 p.m.