From b4e12a64cf1347bd9ca5d7b426f0f0591440d498 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 14 Mar 2015 21:55:03 -0500 Subject: add regression test for bug #1429388 --- tests/test-actions.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests/test-actions.cpp') diff --git a/tests/test-actions.cpp b/tests/test-actions.cpp index 74fc380..2a8e370 100644 --- a/tests/test-actions.cpp +++ b/tests/test-actions.cpp @@ -253,7 +253,7 @@ TEST_F(ActionsFixture, SetCalendarDate) EXPECT_TRUE(g_action_group_has_action(action_group, action_name)); // pick an arbitrary DateTime... - const auto now = DateTime::Local(2010, 1, 2, 3, 4, 5); + auto now = DateTime::Local(2010, 1, 2, 3, 4, 5); // confirm that Planner.time gets changed to that date when we // activate the 'calendar' action with that date's time_t as the arg @@ -261,6 +261,18 @@ TEST_F(ActionsFixture, SetCalendarDate) auto v = g_variant_new_int64(now.to_unix()); g_action_group_activate_action (action_group, action_name, v); EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get())); + + // DST change in US + now = DateTime::Local(2015, 3, 8, 9, 0, 0); + v = g_variant_new_int64(now.to_unix()); + g_action_group_activate_action (action_group, action_name, v); + EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get())); + + // DST change in Europe + now = DateTime::Local(2015, 3, 29, 9, 0, 0); + v = g_variant_new_int64(now.to_unix()); + g_action_group_activate_action (action_group, action_name, v); + EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get())); } TEST_F(ActionsFixture, ActivatingTheCalendarResetsItsDate) -- cgit v1.2.3