File: test-nesting.R

package info (click to toggle)
r-cran-sys 3.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 220 kB
  • sloc: ansic: 540; sh: 13; makefile: 2
file content (12 lines) | stat: -rw-r--r-- 379 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
context("nested jobs")

test_that("Jobs can be nested", {
  skip_if_not(nchar(Sys.which('whoami')) > 0)
  res1 <- sys::exec_internal("whoami")
  expect_equal(res1$status, 0)
  user <- as_text(res1$stdout)
  res2 <- sys::r_internal(c('--silent', '-e', 'sys::exec_wait("whoami")'))
  expect_equal(res2$status, 0)
  output <- as_text(res2$stdout)
  expect_equal(output[2], user)
})