File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,9 @@ expect_no_failure <- function(expr) {
9494expect_snapshot_skip <- function (x , cran = FALSE ) {
9595 expect_snapshot_error(x , class = " skip" , cran = cran )
9696}
97+ expect_skip <- function (code ) {
98+ expect_condition(code , class = " skip" )
99+ }
97100expect_no_skip <- function (code ) {
98101 expect_no_condition(code , class = " skip" )
99102}
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ package_version <- function(x) {
133133skip_unless_r <- function (spec ) {
134134 parts <- unlist(strsplit(spec , " " , fixed = TRUE ))
135135 if (length(parts ) != 2L ) {
136- abort( " ` spec` should be a comparison like '>=' and an R version." )
136+ cli :: cli_abort( " {.arg spec} should be a comparison like '>=' and an R version separated by a space ." )
137137 }
138138 comparator <- match.fun(parts [1L ])
139139 required_version <- numeric_version(parts [2L ])
@@ -142,7 +142,7 @@ skip_unless_r <- function(spec) {
142142 skip_if_not(
143143 comparator(current_version , required_version ),
144144 sprintf(
145- " Version requirement not satisfied: %s %s %s" ,
145+ " R version requirement not satisfied: %s %s %s" ,
146146 current_version , parts [1L ], required_version
147147 )
148148 )
You can’t perform that action at this time.
0 commit comments