tests/testthat/test-getDoCallFromLines.R

test_that("minimal", {
  lines <- c(
    "do.call(mean, list(c(1, 2, 3)))",
    "do.call('mean', list(c(1, 2, 3)))",
    "do.call(\"mean\", list(c(1, 2, 3)))"
  )

  expect_true(all(PaRe:::getDoCallFromLines(lines) == "mean"))
})

Try the PaRe package in your browser

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

PaRe documentation built on April 3, 2025, 6:46 p.m.