798
def test_short_line(self):
799
transport = MockTransport([
802
"b option 10 10 0", # This line isn't terminated, ignored
804
index = self.get_knit_index(transport, "filename", "r")
805
self.assertEqual(['a'], index.get_versions())
807
def test_skip_incomplete_record(self):
808
# A line with bogus data should just be skipped
809
transport = MockTransport([
812
"b option 10 10 0", # This line isn't terminated, ignored
813
"c option 20 10 0 :", # Properly terminated, and starts with '\n'
815
index = self.get_knit_index(transport, "filename", "r")
816
self.assertEqual(['a', 'c'], index.get_versions())
818
def test_trailing_characters(self):
819
# A line with bogus data should just be skipped
820
transport = MockTransport([
823
"b option 10 10 0 :a", # This line has extra trailing characters
824
"c option 20 10 0 :", # Properly terminated, and starts with '\n'
826
index = self.get_knit_index(transport, "filename", "r")
827
self.assertEqual(['a', 'c'], index.get_versions())
799
830
class LowLevelKnitIndexTests_c(LowLevelKnitIndexTests):