dwww Home | Show directory contents | Find package

test_that("labelling compound {} expression gives single string", {
  out <- expr_label(quote({
    1 + 2
  }))

  expect_length(out, 1)
  expect_type(out, "character")
})

test_that("can label multiline functions", {
  expect_equal(
    expr_label(quote(function(x, y) {})),
    "function(x, y) ..."
  )
})

Generated by dwww version 1.15 on Sun May 19 03:22:20 CEST 2024.