tests/testthat/test-scope-character.R

test_that("no indention manipulation but spaces manipulation", {
  expect_warning(test_collection(
    "scope-character", "scope_spaces",
    transformer = style_text, style = tidyverse_style, scope = "spaces"
  ), NA)
})

test_that("no line-break manipulation", {
  expect_warning(test_collection(
    "scope-character", "scope_indention",
    transformer = style_text,
    style = tidyverse_style, scope = "indention"
  ), NA)
})


test_that("no token manipulation", {
  expect_warning(test_collection(
    "scope-character", "scope_line_breaks",
    transformer = style_text,
    style = tidyverse_style,
    scope = "line_breaks"
  ), NA)
})

test_that("no space manipulation", {
  expect_warning(test_collection(
    "scope-character", "scope_tokens",
    transformer = style_text,
    style = tidyverse_style,
    scope = "tokens"
  ), NA)
})


test_that("no manipulation at all", {
  expect_warning(test_collection(
    "scope-character", "scope_none",
    transformer = style_text,
    style = tidyverse_style,
    scope = "none"
  ), 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.