Skip to content

Commit 0e1e8fb

Browse files
committed
Support emscripten in skip_on_os()
1 parent c7fedf4 commit 0e1e8fb

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

R/skip.R

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ skip_on_cran <- function() {
170170

171171
#' @export
172172
#' @param os Character vector of one or more operating systems to skip on.
173-
#' Supported values are `"windows"`, `"mac"`, `"linux"`, and `"solaris"`.
173+
#' Supported values are `"windows"`, `"mac"`, `"linux"`, `"solaris"`,
174+
#' and `"emscripten"`.
174175
#' @param arch Character vector of one or more architectures to skip on.
175176
#' Common values include `"i386"` (32 bit), `"x86_64"` (64 bit), and
176177
#' `"aarch64"` (M1 mac). Supplying `arch` makes the test stricter; i.e. both
@@ -179,15 +180,16 @@ skip_on_cran <- function() {
179180
skip_on_os <- function(os, arch = NULL) {
180181
os <- match.arg(
181182
os,
182-
choices = c("windows", "mac", "linux", "solaris"),
183+
choices = c("windows", "mac", "linux", "solaris", "emscripten"),
183184
several.ok = TRUE
184185
)
185186

186187
msg <- switch(system_os(),
187188
windows = if ("windows" %in% os) "On Windows",
188189
darwin = if ("mac" %in% os) "On Mac",
189190
linux = if ("linux" %in% os) "On Linux",
190-
sunos = if ("solaris" %in% os) "On Solaris"
191+
sunos = if ("solaris" %in% os) "On Solaris",
192+
emscripten = if ("emscripten" %in% os) "On Emscripten"
191193
)
192194

193195
if (!is.null(arch) && !is.null(msg)) {

man/skip.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-skip.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ test_that("can skip on multiple oses", {
122122
expect_snapshot_skip(skip_on_os(c("windows", "linux")))
123123
expect_no_skip(skip_on_os("linux"))
124124
expect_no_skip(skip_on_os("mac"))
125+
expect_no_skip(skip_on_os("emscripten"))
125126
})
126127

127128
test_that("can refine os with arch", {

0 commit comments

Comments
 (0)