diff options
Diffstat (limited to 'tests/test-timezone-file.cpp')
-rw-r--r-- | tests/test-timezone-file.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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()); +} |