Skip to content

Commit

Permalink
hopefully platform-agnostic time zone test
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbeaudette committed Sep 18, 2024
1 parent e99421e commit 02bb9ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/testthat/test-fetchSCAN.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

0 comments on commit 02bb9ae

Please sign in to comment.