summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-get-build-dep3
-rw-r--r--test/libapt/strutil_test.cc9
2 files changed, 12 insertions, 0 deletions
diff --git a/test/integration/test-apt-get-build-dep b/test/integration/test-apt-get-build-dep
index f71beae9c..87ec6e54d 100755
--- a/test/integration/test-apt-get-build-dep
+++ b/test/integration/test-apt-get-build-dep
@@ -34,6 +34,7 @@ EOF
testequal "Reading package lists...
Building dependency tree...
+Note, using file '2vcard_0.5-3.dsc' to get the build dependencies
The following NEW packages will be installed:
build-essential debhelper
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
@@ -76,6 +77,7 @@ EOF
testequal "Reading package lists...
Building dependency tree...
+Note, using file '2vcard_0.5-3.dsc' to get the build dependencies
The following NEW packages will be installed:
build-essential debhelper
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
@@ -117,6 +119,7 @@ EOF
testequal "Reading package lists...
Building dependency tree...
+Note, using directory './foo-1.0' to get the build dependencies
The following NEW packages will be installed:
build-essential debhelper
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
diff --git a/test/libapt/strutil_test.cc b/test/libapt/strutil_test.cc
index e9b778c6b..1c2f0abac 100644
--- a/test/libapt/strutil_test.cc
+++ b/test/libapt/strutil_test.cc
@@ -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"));