Skip to content

Commit

Permalink
Merge pull request #1163 from r-lib/rm-reparsing-test
Browse files Browse the repository at this point in the history
Remove outdated test about repeated parsing
  • Loading branch information
lorenzwalthert authored Dec 3, 2023
2 parents cfcdb48 + dc606ef commit 26eb4fa
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 221 deletions.
21 changes: 0 additions & 21 deletions tests/testthat/parsing/repeated_parsing-in.R

This file was deleted.

152 changes: 0 additions & 152 deletions tests/testthat/parsing/repeated_parsing-in_tree

This file was deleted.

21 changes: 0 additions & 21 deletions tests/testthat/parsing/repeated_parsing-out.R

This file was deleted.

27 changes: 0 additions & 27 deletions tests/testthat/test-parsing.R
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
test_that("repreated parsing solves wrong parent assignment", {
expect_warning(
test_collection(
"parsing", "repeated_parsing",
transformer = style_text,
strict = FALSE
),
NA
)

# move to temp dir
dir <- tempfile("styler")
dir.create(dir)
path_temp <- file.path(dir, "repeated_parsing-in.R")
path_perm <- testthat_file("parsing", "repeated_parsing-in.R")
file.copy(path_perm, dir)

sys_call <- paste0(
"R -q -e \"styler::cache_deactivate(); styler::style_file(\\\"", path_temp, "\\\")\""
)
calls_sys(sys_call, intern = FALSE, ignore.stdout = TRUE, ignore.stderr = TRUE)
ref <- read_utf8_bare(testthat_file("parsing", "repeated_parsing-out.R"))
result <- read_utf8_bare(path_temp)
expect_equal(ref, result)
unlink(dir)
})

test_that("long strings are parsed correctly", {
expect_warning(
test_collection("parsing", "long_strings", transformer = style_text),
Expand Down

0 comments on commit 26eb4fa

Please # to comment.