Skip to content

Commit

Permalink
oof Windows and your goofy linebreaks
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheiss committed Jun 3, 2024
1 parent aa35f18 commit 2978e25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/testthat/helper.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ extract_output <- function(raw_output) {
start_index <- grep("^Overall totals:", raw_output)
end_index <- grep("^Output created:", raw_output) - 1
actual_output <- paste0(raw_output[start_index:end_index], collapse = "\n")

# Switch Windows-style \r\n linebreaks to \n
actual_output <- gsub("\r\n", "\n", actual_output)

actual_output
}

Expand Down

0 comments on commit 2978e25

Please sign in to comment.