tests/testthat/test-util.R

context("util")

test_that("force colour", {
  res <- compiler_output_styles(TRUE)
  expect_is(res$error, "crayon")
})

test_that("shortcircuit operator", {
  expect_equal(NULL %||% 1, 1)
  expect_equal(0 %||% 1, 0)
})
richfitz/rcmdshlib documentation built on May 27, 2019, 8:25 a.m.