tests/testthat/test-ls_fun_calls.R

context("test-ls_fun_calls")

test_that("ls_fun_calls works", {
  fun <- ls_fun_calls(quote(library(tidycode)))
  expect_equal(fun, list("library"))

  fun <- ls_fun_calls(quote(lm(mpg ~ cyl, mtcars)))
  expect_equal(fun, list("lm", "~"))
})

Try the tidycode package in your browser

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

tidycode documentation built on Dec. 11, 2019, 1:08 a.m.