X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d61960d9244340956a27f4ca46aecd15cc75e18b..3dd64b9c53b63ed82e59971614ec1dc242621d9b:/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)