diff --git a/tests/testthat/test-pretty.R b/tests/testthat/test-pretty.R index 9990ba96..b78114b0 100644 --- a/tests/testthat/test-pretty.R +++ b/tests/testthat/test-pretty.R @@ -6,5 +6,13 @@ test_that("pretty_dates works for years", expect_equal(pretty_dates(c(as.Date("1993-12-05"), as.Date("2007-12-01")), 7), ymd(c("1993-01-01 UTC", "1995-01-01 UTC", "1997-01-01 UTC", "1999-01-01 UTC", "2001-01-01 UTC", "2003-01-01 UTC", - "2005-01-01 UTC", "2007-01-01 UTC"))) + "2005-01-01 UTC", "2007-01-01 UTC"))) + + ## https://github.com/hadley/lubridate/issues/248 + expect_equal( + pretty_dates(ymd_hms("2014-02-05 22:45:46 GMT", "2014-03-03 14:28:20"), 10), + ymd(c("2014-02-05 UTC", "2014-02-07 UTC", "2014-02-09 UTC", "2014-02-11 UTC", + "2014-02-13 UTC", "2014-02-15 UTC", "2014-02-17 UTC", "2014-02-19 UTC", + "2014-02-21 UTC", "2014-02-23 UTC", "2014-02-25 UTC", "2014-02-27 UTC", + "2014-03-01 UTC", "2014-03-03 UTC"))) })