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)
})
r-lib/styler documentation built on April 10, 2024, 4 a.m.