tests/testthat/sanitizeCovr.R

# Coverage tool covr::codecov() alters the behaviour of inShell() function. This function
# recovers from that for testing purposes.
sanitizeCovr <- function(r) {
  i <- grep('covr:::count(', r, fixed=TRUE)
  res <- r
  if (length(i) > 0) {
    res[i+1] <- gsub('  ', ' ', res[i+1], fixed=TRUE)
    res <- res[-1 * c(i-1, i, i+2)]
  }
  res
}

Try the rmake package in your browser

Any scripts or data that you put into this service are public.

rmake documentation built on May 1, 2019, 10:37 p.m.