From 1b34101be9b3f670c55d63894bffbe848a8b5fb3 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Sat, 8 Apr 2023 12:21:35 -0700 Subject: [PATCH] ns-qualify rex in tests --- tests/testthat/test-knitr_formats.R | 2 +- tests/testthat/test-object_name_linter.R | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testthat/test-knitr_formats.R b/tests/testthat/test-knitr_formats.R index ac33060bb..7ae3f63f7 100644 --- a/tests/testthat/test-knitr_formats.R +++ b/tests/testthat/test-knitr_formats.R @@ -4,7 +4,7 @@ regexes <- list( quotes = rex::rex("Only use double-quotes."), trailing = rex::rex("Trailing blank lines are superfluous."), trailws = rex::rex("Trailing whitespace is superfluous."), - indent = rex("Indentation should be") + indent = rex::rex("Indentation should be") ) test_that("it handles dir", { diff --git a/tests/testthat/test-object_name_linter.R b/tests/testthat/test-object_name_linter.R index d9905032a..9c19acbe8 100644 --- a/tests/testthat/test-object_name_linter.R +++ b/tests/testthat/test-object_name_linter.R @@ -165,12 +165,12 @@ test_that("object_name_linter won't fail if an imported namespace is unavailable test_that("object_name_linter supports custom regexes", { # disables default styles linter <- object_name_linter( - regexes = c("shinyModule" = rex(start, lower, zero_or_more(alnum), "UI" %or% "Server", end)) + regexes = c("shinyModule" = rex::rex(start, lower, zero_or_more(alnum), "UI" %or% "Server", end)) ) msg <- rex::rex("Variable and function name style should match shinyModule.") linter2 <- object_name_linter( styles = c("snake_case", "symbols"), - regexes = c("shinyModule" = rex(start, lower, zero_or_more(alnum), "UI" %or% "Server", end)) + regexes = c("shinyModule" = rex::rex(start, lower, zero_or_more(alnum), "UI" %or% "Server", end)) ) msg2 <- rex::rex("Variable and function name style should match snake_case, symbols or shinyModule.")