]> git.saurik.com Git - apt.git/blobdiff - test/libapt/strutil_test.cc
Merge branch 'debian/sid' into debian/experimental
[apt.git] / test / libapt / strutil_test.cc
index e9b778c6b858e3127a4d4df18d1e03171e2c5336..1c2f0abac84053589806d0054e30f8cc35983def 100644 (file)
@@ -70,6 +70,15 @@ TEST(StrUtilTest,EndsWith)
    EXPECT_FALSE(Endswith("abcd", "x"));
    EXPECT_FALSE(Endswith("abcd", "abcndefg"));
 }
+TEST(StrUtilTest,StartWith)
+{
+   using APT::String::Startswith;
+   EXPECT_TRUE(Startswith("abcd", "a"));
+   EXPECT_TRUE(Startswith("abcd", "ab"));
+   EXPECT_TRUE(Startswith("abcd", "abcd"));
+   EXPECT_FALSE(Startswith("abcd", "x"));
+   EXPECT_FALSE(Startswith("abcd", "abcndefg"));
+}
 TEST(StrUtilTest,SubstVar)
 {
    EXPECT_EQ("", SubstVar("", "fails", "passes"));