knitr::opts_chunk$set( error = TRUE, collapse = TRUE, comment = "#>", out.width = "100%" )
library(testthat) library(jeksterslabRutils) context("Test util_cat_sys.")
year <- format(Sys.time(), "%Y") knitr::kable( x = data.frame( Variable = "`year`", Description = "Current year.", Value = year ), row.names = FALSE )
results <- capture.output( util_cat_sys( command = "date +%Y" ) )
knitr::kable( x = data.frame( Description = "Current year.", Parameter = year, Result = results ), row.names = FALSE )
test_that("util_cat_sys works", { expect_equivalent( results, year ) })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.