From 3d284148090b6349c216407bb2766bd8f6a962f0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 29 Nov 2015 14:05:38 +0100 Subject: tests: fix typos, correct helpmsgs and test tests Git-Dch: Ignore --- apt-pkg/depcache.h | 2 +- test/integration/framework | 10 +++++----- test/integration/test-apt-get-source | 7 ++++++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/apt-pkg/depcache.h b/apt-pkg/depcache.h index 7521133d4..10f869f25 100644 --- a/apt-pkg/depcache.h +++ b/apt-pkg/depcache.h @@ -362,7 +362,7 @@ class pkgDepCache : protected pkgCache::Namespace inline pkgVersioningSystem &VS() {return *Cache->VS;}; // Policy implementation - APT_DEPRECATED_MSG("Confusingly named method which returns the candidate as choosen by policy (NOT as choosen via .SetCandidateVersion!). You probably want to use .GetCandidateVersion instead.") inline VerIterator GetCandidateVer(PkgIterator const &Pkg) {return /* GetCandidateVersion(Pkg); but for API compat: */ LocalPolicy->GetCandidateVer(Pkg);}; + APT_DEPRECATED_MSG("Confusingly named method which returns the candidate as chosen by policy (NOT as chosen via .SetCandidateVersion!). You probably want to use .GetCandidateVersion instead.") inline VerIterator GetCandidateVer(PkgIterator const &Pkg) {return /* GetCandidateVersion(Pkg); but for API compat: */ LocalPolicy->GetCandidateVer(Pkg);}; inline bool IsImportantDep(DepIterator Dep) const {return LocalPolicy->IsImportantDep(Dep);}; inline Policy &GetPolicy() {return *LocalPolicy;}; diff --git a/test/integration/framework b/test/integration/framework index ce10002ec..3e159f6a9 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -574,7 +574,7 @@ setupsimplenativepackage() { local DESCRIPTION="${6:-"an autogenerated dummy ${NAME}=${VERSION}/${RELEASE} If you find such a package installed on your system, something went horribly wrong! They are autogenerated - und used only by testcases and surf no other propose…"}" + und used only by testcases and serve no other purpose…"}" local SECTION="${7:-others}" local DISTSECTION @@ -630,7 +630,7 @@ buildsimplenativepackage() { local DESCRIPTION="${6:-"an autogenerated dummy ${NAME}=${VERSION}/${RELEASE} If you find such a package installed on your system, something went horribly wrong! They are autogenerated - und used only by testcases and surf no other propose…"}" + und used only by testcases and serve no other purpose…"}" local SECTION="${7:-others}" local PRIORITY="${8:-optional}" @@ -812,7 +812,7 @@ insertpackage() { local DESCRIPTION="${7:-"an autogenerated dummy ${NAME}=${VERSION}/${RELEASES} If you find such a package installed on your system, something went horribly wrong! They are autogenerated - und used only by testcases and surf no other propose…"}" + und used only by testcases and serve no other purpose…"}" local ARCHS="" for RELEASE in $(printf '%s' "$RELEASES" | tr ',' '\n'); do if [ "$RELEASE" = 'installed' ]; then @@ -891,7 +891,7 @@ insertinstalledpackage() { local DESCRIPTION="${7:-"an autogenerated dummy ${NAME}=${VERSION}/installed If you find such a package installed on your system, something went horribly wrong! They are autogenerated - und used only by testcases and surf no other propose…"}" + und used only by testcases and serve no other purpose…"}" local FILE='rootdir/var/lib/dpkg/status' local INFO='rootdir/var/lib/dpkg/info' @@ -1197,7 +1197,7 @@ changetowebserver() { fi cd - > /dev/null else - msgdie 'You have to build aptwerbserver or install a webserver' + msgdie 'You have to build apt from source to have test/interactive-helper/aptwebserver available for tests requiring a webserver' fi if [ "$REWRTE" != 'yes' ]; then rewritesourceslist "http://localhost:${APTHTTPPORT}/" diff --git a/test/integration/test-apt-get-source b/test/integration/test-apt-get-source index 48a70277c..99777a530 100755 --- a/test/integration/test-apt-get-source +++ b/test/integration/test-apt-get-source @@ -27,7 +27,7 @@ insertsource 'stable' 'foo' 'all' '1.0' insertsource 'wheezy' 'foo' 'all' '0.0.1' insertsource 'wheezy' 'foo' 'all' '0.1' -# the order of these versions is choosen to ensure that +# the order of these versions is chosen to ensure that # * apt will pick the one in the correct release, despite a higher version coming later and # * apt will pick the highest version in a release, despite a lower version coming later. # (bts #746412) @@ -35,6 +35,11 @@ insertsource 'stable' 'baz' 'all' '1.0' insertsource 'unstable' 'baz' 'all' '2.0' insertsource 'unstable' 'baz' 'all' '1.5' +# ensure we really have the situation we wanted (first 2.0 is foo above) +testequal 'Version: 2.0 +Version: 2.0 +Version: 1.5' grep '^Version:' aptarchive/dists/unstable/main/source/Sources + insertsource 'stable' 'bar' 'any' '1.1' 'Vcs-Browser: https://anonscm.debian.org/cgit/bar/bar.git Vcs-Git: git://anonscm.debian.org/bar/bar.git -b debian/experimental' -- cgit v1.2.3