tests/testthat/test-print.R

test_that("ast_modify", {
  foo <- function(x) {
    x + 1
  }

  b <- ast_decompose(foo)
  expect_output(print(b), "fxn:")
  expect_output(print(b), "function \\(")
  expect_output(print(b), "x \\+ 1")
})
sckott/astr documentation built on Nov. 12, 2024, 4:19 p.m.