Skip to content

Commit

Permalink
Skip keypress tests on CRAN
Browse files Browse the repository at this point in the history
They are a little flaky.
  • Loading branch information
gaborcsardi committed Jun 20, 2024
1 parent 1a7b807 commit 0dfbf1b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/testthat/test-keypress.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

test_that("control characaters", {
skip_on_cran()
p <- r_pty()

expect_snapshot(
Expand All @@ -14,6 +15,7 @@ test_that("control characaters", {
})

test_that("write ahead", {
skip_on_cran()
p <- r_pty()
expect_snapshot({
p$write_input("{ Sys.sleep(0.5); cli::keypress() }\nX")
Expand All @@ -23,6 +25,7 @@ test_that("write ahead", {
})

test_that("arrows, etc", {
skip_on_cran()
p <- r_pty()
keys <- paste0("\033", c(
"[A", "[C", "[D", "[F", "[H", "-",
Expand All @@ -47,6 +50,7 @@ test_that("arrows, etc", {
})

test_that("nonblocking", {
skip_on_cran()
p <- r_pty()
expect_snapshot({
p$write_input("cli::keypress(block = FALSE)\n")
Expand Down

0 comments on commit 0dfbf1b

Please sign in to comment.