]> git.saurik.com Git - apt.git/blobdiff - test/libapt/strutil_test.cc
Use _apt as our unprivileged user name
[apt.git] / test / libapt / strutil_test.cc
index 194c9c074056f3ae0e1172840e2f9d48ceca44f4..8dd9114ecb122e8631daf0f6cd5cc64e0a5f47d0 100644 (file)
@@ -85,6 +85,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"));