inst/tests/test-options.R

test_that("get options does not fail", {
	optionNames <- sort(names(get.restore.point.options()))
	expect_equal(optionNames, c(
				    "break.point.to.global", 
				    "deep.copy", 
				    "disable",
				    "display.restore.point", 
				    "multi.line.parse.error",
				    "storing",
				    "to.global", 
				    "trace.calls")) 
});

test_that("options can be set", {
	old <- get.restore.point.options()[["deep.copy"]]
	restore.point.options(deep.copy = TRUE)
	new <- get.restore.point.options()[["deep.copy"]]	
	expect_equal(old, FALSE)
	expect_equal(new, TRUE)
	restore.point.options(deep.copy = old)
})

Try the restorepoint package in your browser

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

restorepoint documentation built on May 2, 2019, 7:47 a.m.