add TextLoader::get_eol_at_eof()

This commit is contained in:
josh committed 2016-07-24 12:06:50 -04:00
1 parent 500a6891d4
commit 89e8dc5de3
3 files changed
+7

No files matched your search

+4
View File
@@ -23,6 +23,7 @@ TEST(TextLoaderTest, loading_empty_file)
auto file = TestSupport::read_file("test/files/empty.txt");
tl.load_buffer(&(*file)[0], file->size());
EXPECT_EQ(0u, tl.num_lines());
EXPECT_EQ(true, tl.get_eol_at_eof());
}
TEST(TextLoaderTest, detects_lf_line_endings)
@@ -36,6 +37,7 @@ TEST(TextLoaderTest, detects_lf_line_endings)
EXPECT_EQ("Hello.", line_to_string(it));
it++;
EXPECT_EQ("This file is in LF line ending format.", line_to_string(it));
EXPECT_EQ(true, tl.get_eol_at_eof());
}
TEST(TextLoaderTest, detects_cr_line_endings)
@@ -49,6 +51,7 @@ TEST(TextLoaderTest, detects_cr_line_endings)
EXPECT_EQ("Hello.", line_to_string(it));
it++;
EXPECT_EQ("This file is in CR line ending format.", line_to_string(it));
EXPECT_EQ(true, tl.get_eol_at_eof());
}
TEST(TextLoaderTest, detects_crlf_line_endings)
@@ -62,4 +65,5 @@ TEST(TextLoaderTest, detects_crlf_line_endings)
EXPECT_EQ("Hello.", line_to_string(it));
it++;
EXPECT_EQ("This file is in CRLF line ending format.", line_to_string(it));
EXPECT_EQ(true, tl.get_eol_at_eof());
}