Skip to content

Commit

Permalink
test for mismatch with long clipboard payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlincoln committed Sep 17, 2024
1 parent a04e043 commit 2c78bfd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/testthat/test-sizes.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
context("board size limits")

mirror <- function(length) {
longstr <- paste0(sample(letters, length, replace = TRUE), collapse = "")
invisible(write_clip(longstr))
readstr <- read_clip()
expect_equal(readstr, longstr)
return(TRUE)
}

test_that("large sizes of content can be copied losslessly", {
lapply(10^(1:8), mirror)
})

0 comments on commit 2c78bfd

Please sign in to comment.