tests/testthat/test-question.R

test_that("prefix operators", {
  knitr::knit("test-question-prefix.Rmd", encoding = "UTF-8", quiet = TRUE)
  expect_identical_except_bytecode("test-question-prefix.md", "ans.md")
})


test_that("pseudo postfix operators", {
  knitr::knit("test-question-postfix.Rmd", encoding = "UTF-8", quiet = TRUE)
  expect_identical_except_bytecode("test-question-postfix.md", "ans.md")
})

test_that("infix operator", {
  # For better test, dummy S4 generic and method are required
  expect_error(dummy_e1?dummy_e2)
})

Try the felp package in your browser

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

felp documentation built on Sept. 14, 2020, 9:07 a.m.