mirror of
https://github.com/msberends/AMR.git
synced 2026-10-01 04:13:33 +02:00
fix clipboard check
This commit is contained in:
1 parent
8fe70d5652
commit
6fa93fc286
2 files changed
+10
-10
No files matched your search
@@ -1,12 +1,12 @@
|
||||
context("clipboard.R")
|
||||
|
||||
test_that("clipboard works", {
|
||||
t1 <<- AMR::antibiotics # why is the <<- needed? Won't work without it...
|
||||
clipboard_export(t1, info = FALSE)
|
||||
t2 <- clipboard_import()
|
||||
if (is.null(t1) | is.null(t2)) {
|
||||
t1 <- TRUE
|
||||
t2 <- TRUE
|
||||
if (grepl(Sys.info()['sysname'], "windows", ignore.case = TRUE)) {
|
||||
t1 <<- AMR::antibiotics # why is the <<- needed? Won't work without it...
|
||||
clipboard_export(t1, info = FALSE)
|
||||
t2 <- clipboard_import()
|
||||
expect_equal(t1, t2)
|
||||
} else {
|
||||
expect_equal(TRUE, TRUE)
|
||||
}
|
||||
expect_equal(t1, t2)
|
||||
})
|
||||
Reference in new issue
Block a user