X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/343325f4cc460b709fc929f85bc2a3d4691d63fe..8d058ea53b18348f81229049a27d14282bd8d8c1:/test/libapt/tagfile_test.cc diff --git a/test/libapt/tagfile_test.cc b/test/libapt/tagfile_test.cc index df618ea16..d7030f41a 100644 --- a/test/libapt/tagfile_test.cc +++ b/test/libapt/tagfile_test.cc @@ -34,6 +34,12 @@ TEST(TagFileTest,SingleField) EXPECT_FALSE(section.Exists("FieldB-12345678")); // There is only one section in this tag file EXPECT_FALSE(tfile.Step(section)); + + // Now we scan an empty section to test reset + ASSERT_TRUE(section.Scan("\n\n", 2, true)); + EXPECT_EQ(0, section.Count()); + EXPECT_FALSE(section.Exists("FieldA-12345678")); + EXPECT_FALSE(section.Exists("FieldB-12345678")); } TEST(TagFileTest,MultipleSections)