From e7d50063cd4b22a45f111b903a87411bd05e3194 Mon Sep 17 00:00:00 2001 From: "Mathew W. McLean" Date: Tue, 4 Jul 2017 19:27:55 +1000 Subject: [PATCH] shorten test on CRAN --- tests/testthat/test-methods.R | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-methods.R b/tests/testthat/test-methods.R index 888293e..5a3ea17 100755 --- a/tests/testthat/test-methods.R +++ b/tests/testthat/test-methods.R @@ -10,12 +10,20 @@ bib <- ReadBib(system.file("Bib", "biblatexExamples.bib", test_that("yaml printing with authoryear", { BibOptions(check.entries = FALSE) - print(bib[47:92], .opts = list(bib.style = "authoryear", + idx <- if (Sys.getenv("NOT_CRAN") == "") + 47:92 + else + 48:50 + print(bib[idx], .opts = list(bib.style = "authoryear", sorting = "anyvt", style = "yaml")) }) test_that("R style printing with authoryear", { - print(bib[1:46], .opts = list(bib.style = "authoryear", + idx <- if (Sys.getenv("NOT_CRAN") == "true") + 1:46 + else + 8:10 + print(bib[idx], .opts = list(bib.style = "authoryear", sorting = "anyt", style = "R")) })