tests/testthat/test-indention_round_brackets.R

test_that("one-line function call yields correct indention", {
  expect_warning(test_collection("indention_round_brackets",
    "one_line",
    transformer = style_text
  ), NA)
})

##  ............................................................................

test_that(paste("multi-line function call yields correct indention"), {
  expect_warning(test_collection("indention_round_brackets",
    "multi_line",
    transformer = style_text
  ), NA)
})

##  ............................................................................




# Does NOT cover indention by operators such as +"

test_that("arithmetic grouping with braces yields correctly indention", {
  expect_warning(test_collection("indention_round_brackets",
    "arithmetic",
    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.