From 02bb9aeb6ba116d4014e93af123a2906dde3d4a0 Mon Sep 17 00:00:00 2001 From: Beaudette Date: Wed, 18 Sep 2024 11:00:46 -0700 Subject: [PATCH] hopefully platform-agnostic time zone test --- tests/testthat/test-fetchSCAN.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-fetchSCAN.R b/tests/testthat/test-fetchSCAN.R index f000201e..88ddced6 100644 --- a/tests/testthat/test-fetchSCAN.R +++ b/tests/testthat/test-fetchSCAN.R @@ -66,5 +66,10 @@ test_that("timezone check", { # should be GMT-8, that of the first station (2218) .tz <- table(format(z$SMS$datetime, format = '%Z')) - expect_equal(names(.tz), '-08') + # windows and macos should return '-08' + # linux returns c('etc', '-08') + + # platform agnostic test + .test <- any(grepl('-08', c(names(.tz), 'etc'))) + expect_true(.test) })