X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b578738870e83db4e61d6f6591bc73884108b7d4..eed65c79322c3c79facdea44ce39033b21972e36:/test/libapt/strutil_test.cc?ds=sidebyside diff --git a/test/libapt/strutil_test.cc b/test/libapt/strutil_test.cc index 194c9c074..8dd9114ec 100644 --- a/test/libapt/strutil_test.cc +++ b/test/libapt/strutil_test.cc @@ -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"));