]> git.saurik.com Git - apt.git/blobdiff - test/libapt/tagfile_test.cc
remove Dir:: scope limit of RootDir in the documentation
[apt.git] / test / libapt / tagfile_test.cc
index df618ea1617183f64e5963b5e2b3fb5b870edd71..d7030f41a2723a8144925b7e0b6f8524d11224fc 100644 (file)
@@ -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)