tests/testthat/test-multipla.R

test_that("multipla: html", {

  opts <- c(
    'A primeira',
    'A segunda',
    resposta = 'A terceira',
    'A quarta',
    resposta = 'A quinta'
  )

  # Random id is generated by longmcq, which is called by multipla
  set.seed(123)

  expect_snapshot(cat(multipla(opts, output = 'html')))

})

test_that("lacuna: latex", {

  opts <- c(
    'A primeira',
    'A segunda',
    resposta = 'A terceira',
    'A quarta',
    resposta = 'A quinta'
  )

  expect_snapshot(cat(multipla(opts, output = 'latex')))

})
fnaufel/Rexerc documentation built on April 28, 2022, 4:44 p.m.