tests/testthat/test-rcmd-process.R

context("rcmd_process")

test_that("create and run rcmd_process", {
  opts <- rcmd_process_options(cmd = "config", cmdargs = "CC")
  x <- rcmd_process$new(opts)
  x$wait()
  expect_equal(x$get_exit_status(), 0)
  out <- x$read_output_lines()
  expect_match(out, ".")
  rm(x)
  gc()
})
r-pkgs/callr documentation built on Aug. 27, 2018, 5:31 a.m.