Skip to content

Commit

Permalink
ns-qualify rex in tests (#1957)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico authored Apr 9, 2023
1 parent b233d7a commit 8df42ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-knitr_formats.R
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-object_name_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down

0 comments on commit 8df42ec

Please sign in to comment.