From 41f40b5821cf95609fc61aeb77e3efb47aae66ad Mon Sep 17 00:00:00 2001 From: Alex Axthelm Date: Wed, 20 Mar 2024 19:44:49 +0100 Subject: [PATCH] Switch pattern and replacement in file path fix --- tests/testthat/test-get_package_info.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-get_package_info.R b/tests/testthat/test-get_package_info.R index 9cae5927..b098c598 100644 --- a/tests/testthat/test-get_package_info.R +++ b/tests/testthat/test-get_package_info.R @@ -82,7 +82,7 @@ expect_package_info <- function( testthat::expect_match( package_info[[package_identical]][["remotepkgref"]], # gsub is used to make windows path into something matching .libPaths() - gsub(x = remotepkgref_match, pattern = "[\\]", replacement = "\\\\"), + gsub(x = remotepkgref_match, pattern = "[\\\\]", replacement = "\\"), ) testthat::expect_identical( package_info[[package_identical]][["remoteref"]], @@ -166,7 +166,7 @@ test_that("get_individual_package_info collects information for GitHub packages test_that("get_individual_package_info errors for package that doesn't exist", { #nolint: line_length_linter expect_error( - get_individual_package_info("this_package_does_not_exist"), + get_individual_package_info("this_package_does_not_exist") ) })