Skip to content

Commit

Permalink
Need fixed=TRUE
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico authored Dec 5, 2023
1 parent 432c4e8 commit e056664
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .dev/lint_metadata_test.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ library(testthat)

xml_nodes_to_lints_file <- "R/xml_nodes_to_lints.R"

xml_nodes_to_lints_file |>
readLines() |>
original <- readLines(xml_nodes_to_lints_file)
writeLines(
sub(
pattern = "line_number = as.integer(line1)",
replacement = "line_number = as.integer(2^31 - 1)"
) |>
writeLines(xml_nodes_to_lints_file)
"line_number = as.integer(line1)",
"line_number = as.integer(2^31 - 1)",
fixed = TRUE
),
xml_nodes_to_lints_file
)
# Not useful in CI but good when running locally.
withr::defer(writeLines(original, xml_nodes_to_lints_file))

pkgload::load_all()

Expand Down

0 comments on commit e056664

Please sign in to comment.