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")
})
ropenscilabs/astr documentation built on Nov. 13, 2024, 12:16 a.m.