- fds = Cnf.FindVector("APT::Keep-Fds");
- equals(fds[0], "28");
- equals(fds[1], "17");
- equals(fds[2], "47");
- equals(fds[3], "broken");
- equals(fds.size(), 4);
- equals(Cnf.Exists("APT::Keep-Fds::2"), true);
- equals(Cnf.Find("APT::Keep-Fds::2"), "47");
- equals(Cnf.FindI("APT::Keep-Fds::2"), 47);
- equals(Cnf.Exists("APT::Keep-Fds::3"), false);
- equals(Cnf.Find("APT::Keep-Fds::3"), "");
- equals(Cnf.FindI("APT::Keep-Fds::3", 56), 56);
- equals(Cnf.Find("APT::Keep-Fds::3", "not-set"), "not-set");
+ std::vector<std::string> fds = Cnf.FindVector("APT::Keep-Fds");
+ ASSERT_EQ(4, fds.size());
+ EXPECT_EQ("28", fds[0]);
+ EXPECT_EQ("17", fds[1]);
+ EXPECT_EQ("47", fds[2]);
+ EXPECT_EQ("broken", fds[3]);
+
+ EXPECT_TRUE(Cnf.Exists("APT::Keep-Fds::2"));
+ EXPECT_EQ("47", Cnf.Find("APT::Keep-Fds::2"));
+ EXPECT_EQ(47, Cnf.FindI("APT::Keep-Fds::2"));
+ EXPECT_FALSE(Cnf.Exists("APT::Keep-Fds::3"));
+ EXPECT_EQ("", Cnf.Find("APT::Keep-Fds::3"));
+ EXPECT_EQ(56, Cnf.FindI("APT::Keep-Fds::3", 56));
+ EXPECT_EQ("not-set", Cnf.Find("APT::Keep-Fds::3", "not-set"));