tests/testthat/test-strict.R

test_that("can style example source file with strict = TRUE", {
  expect_warning(test_collection(
    "strict", "strict",
    transformer = style_text,
    strict = TRUE
  ), NA)
})

test_that("can style example source file with strict = FALSE", {
  expect_warning(test_collection(
    "strict", "non_strict",
    transformer = style_text,
    strict = FALSE
  ), NA)
})

test_that("removes space at EOL", {
  expect_warning(test_collection(
    "strict", "eol",
    transformer = style_text,
    strict = FALSE
  ), NA)
})

test_that("removes blank lines at EOF", {
  expect_warning(test_collection(
    "strict", "eof",
    transformer = style_text,
    strict = FALSE
  ), 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.