Skip to content

Commit

Permalink
Check on R 3.2 (#813)
Browse files Browse the repository at this point in the history
Fixes #582
  • Loading branch information
hadley authored Nov 19, 2019
1 parent 1cc35c6 commit a3fbaad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ addons:

matrix:
include:
- r: 3.2
- r: 3.3
- r: oldrel
- r: release
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ URL: http://lubridate.tidyverse.org,
BugReports: https://github.com/tidyverse/lubridate/issues
Depends:
methods,
R (>= 3.1)
R (>= 3.2)
Imports:
Rcpp (>= 0.12.13)
Suggests:
Expand Down
11 changes: 6 additions & 5 deletions tests/testthat/test-timezones.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ test_that("local_time works as expected", {
expect_equal(local_time(x, "Europe/Amsterdam"),
local_time(with_tz(x, "Europe/Amsterdam")))

x <- ymd_hms("2009-08-07 01:02:03")
expect_equal(local_time(x, c("America/New_York", "Europe/Amsterdam", "Asia/Shanghai")),
c(local_time(with_tz(x, "America/New_York")),
local_time(with_tz(x, "Europe/Amsterdam")),
local_time(with_tz(x, "Asia/Shanghai"))))
x1 <- ymd_hms("2009-08-07 01:02:03")
x2 <- local_time(x1, c("America/New_York", "Europe/Amsterdam", "Asia/Shanghai"))

expect_equal(x2[1], local_time(with_tz(x1, "America/New_York")))
expect_equal(x2[2], local_time(with_tz(x1, "Europe/Amsterdam")))
expect_equal(x2[3], local_time(with_tz(x1, "Asia/Shanghai")))
})

test_that("with_tz throws warning on unrecognized time zones", {
Expand Down

0 comments on commit a3fbaad

Please sign in to comment.