tests/testthat/test-unindention.R

test_that("round brackets are unindented correctly", {
  expect_warning(test_collection("unindention",
    "mixed",
    transformer = style_text_without_curly_curly
  ), NA)
})

test_that("tokens are not dropped in named vector", {
  expect_warning(test_collection("unindention",
    "vec",
    transformer = style_text
  ), NA)
})


test_that(paste(
  "if last token is multi-line and no line break precede,",
  "unindention is correct"
), {
  expect_warning(test_collection("unindention",
    "vec",
    transformer = style_text
  ), NA)
})

Try the styler package in your browser

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

styler documentation built on Aug. 29, 2023, 5:10 p.m.