File: test-inject-funs.R

package info (click to toggle)
r-cran-evaluate 1.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 436 kB
  • sloc: sh: 13; makefile: 2
file content (7 lines) | stat: -rw-r--r-- 187 bytes parent folder | download
1
2
3
4
5
6
7
test_that("can inject functons into evaluation context", {
  old <- inject_funs(f = function() 1)
  defer(inject_funs(old))

  ev <- evaluate("f()")
  expect_equal(ev[[2]], "[1] 1\n")
})