knitr::opts_chunk$set( error = TRUE, collapse = TRUE, comment = "#>", out.width = "100%" )
library(testthat) library(jeksterslabRterm) library(jeksterslabRutils) context("Test term_rprofile.")
tmp <- file.path( tempdir(), util_rand_str() ) dir.create(tmp) on.exit( unlink( tmp, recursive = TRUE ) ) fn_rprofile <- file.path( tmp, ".Rprofile" )
term_rprofile( dir = tmp, overwrite = TRUE )
test_that(".Rprofile", { expect_true( file.exists(fn_rprofile) ) })
test_that("warning", { expect_warning( term_rprofile( dir = tmp, overwrite = FALSE ) ) })
unlink( c( fn_rprofile, tmp ), recursive = TRUE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.