knitr::opts_chunk$set(
  error = TRUE,
  collapse = TRUE,
  comment = "#>",
  out.width = "100%"
)
library(testthat)
library(jeksterslabRutils)
context("Test util_distro.")

Parameters

os <- util_os()
# It's difficult to hard code tests for distro
# since the package can be used in a variety of Linux Distributions.
distro <- util_distro()
test_that("util_os works", {
  expect_true(
    (os %in% c("linux", "osx", "windows"))
  )
})
test_that("util_distro works", {
  if (os == "osx" | os == "windows") {
    expect_equivalent(
      distro,
      os
    )
  }
})


jeksterslabds/jeksterslabRutils documentation built on Jan. 18, 2021, 11:41 p.m.