tests/testthat/test-opts.R

test_that("options set on package load", {
  x <- tabr_options()
  expect_is(x, "list")
  expect_identical(names(x), c("lilypond", "midi2ly", "python"))
  expect_is(tabr_options(x = 1), "NULL")
  expect_is(tabr_options(dev = "png"), "NULL")
  expect_equal(tabr_options()$x, 1)
  expect_equal(tabr_options()$dev, "png")
})

Try the tabr package in your browser

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

tabr documentation built on Sept. 21, 2023, 5:06 p.m.