diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manual-test-snap.cpp | 2 | ||||
-rw-r--r-- | tests/test-timezone-file.cpp | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/tests/manual-test-snap.cpp b/tests/manual-test-snap.cpp index 51556cd..16e606a 100644 --- a/tests/manual-test-snap.cpp +++ b/tests/manual-test-snap.cpp @@ -36,8 +36,6 @@ int main() a.summary = "Alarm"; a.url = "alarm:///hello-world"; a.uid = "D4B57D50247291478ED31DED17FF0A9838DED402"; - a.is_event = false; - a.is_daily = false; a.has_alarms = true; auto begin = g_date_time_new_local(2014,12,25,0,0,0); auto end = g_date_time_add_full(begin,0,0,1,0,0,-1); diff --git a/tests/test-timezone-file.cpp b/tests/test-timezone-file.cpp index 453b353..aec597c 100644 --- a/tests/test-timezone-file.cpp +++ b/tests/test-timezone-file.cpp @@ -131,3 +131,16 @@ TEST_F(TimezoneFixture, ChangedValue) ASSERT_TRUE(changed); ASSERT_EQ(changed_timezone, tz.timezone.get()); } + + +/** + * Test that timezone-file picks up the initial value + */ +TEST_F(TimezoneFixture, IgnoreComments) +{ + const std::string comment = "# Created by cloud-init v. 0.7.5 on Thu, 24 Apr 2014 14:03:29 +0000"; + const std::string expected_timezone = "Europe/Berlin"; + set_file(comment + "\n" + expected_timezone); + FileTimezone tz(TIMEZONE_FILE); + ASSERT_EQ(expected_timezone, tz.timezone.get()); +} |