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)
})
krlmlr/styler documentation built on April 24, 2024, 4:14 p.m.