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)
})
skranz/restorepoint documentation built on June 30, 2024, 11:13 p.m.