diff options
author | David Kalnischkies <david@kalnischkies.de> | 2018-04-11 12:59:06 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2018-05-11 17:58:46 +0200 |
commit | bf53f39c9a0221b670ffff74053ed36fc502d5a0 (patch) | |
tree | 5038a5054962342e34905e44e20e359f30ab2367 /test | |
parent | c5e2fa2b772524c03b0c7f777ffea6f2485fe6ca (diff) |
Support --with-source in show & search commands
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/test-apt-get-install-deb | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/test/integration/test-apt-get-install-deb b/test/integration/test-apt-get-install-deb index 36e94a2dc..ff103a514 100755 --- a/test/integration/test-apt-get-install-deb +++ b/test/integration/test-apt-get-install-deb @@ -8,20 +8,26 @@ setupenvironment configarchitecture 'amd64' 'i386' # regression test for #754904 -testfailureequal 'E: Unsupported file /dev/null given on commandline' aptget install -qq /dev/null - -# only consider .deb files cat > foo.rpm <<EOF I'm not a deb, I'm a teapot. EOF -testfailureequal 'E: Unsupported file ./foo.rpm given on commandline' aptget install -qq ./foo.rpm +for exe in apt aptget; do + for cmd in install remove purge upgrade full-upgrade; do + testfailureequal 'E: Unsupported file /dev/null given on commandline' $exe $cmd -qq /dev/null + testfailureequal 'E: Unsupported file ./foo.rpm given on commandline' $exe $cmd -qq ./foo.rpm + done +done # and ensure we fail for invalid debs mv foo.rpm foo.deb -testfailuremsg "E: Sub-process Popen returned an error code (2) +for exe in apt aptget; do + for cmd in install remove purge upgrade full-upgrade; do + testfailuremsg "E: Sub-process Popen returned an error code (2) E: Encountered a section with no Package: header E: Problem with MergeList ${TMPWORKINGDIRECTORY}/foo.deb -E: The package lists or status file could not be parsed or opened." aptget install ./foo.deb +E: The package lists or status file could not be parsed or opened." $exe $cmd ./foo.deb + done +done buildsimplenativepackage 'foo' 'i386,amd64' '1.0' @@ -40,6 +46,20 @@ The following packages have unmet dependencies: foo : Conflicts: foo:i386 but 1.0 is to be installed E: Unable to correct problems, you have held broken packages." aptget install ./incoming/foo_1.0_i386.deb ./incoming/foo_1.0_amd64.deb -s +testsuccess apt show foo --with-source ./incoming/foo_1.0_amd64.deb +testequal 'Package: foo +Version: 1.0' head -n 2 rootdir/tmp/testsuccess.output +testsuccessequal 'Sorting... +Full Text Search... +foo/local-deb 1.0 amd64 + an autogenerated dummy foo=1.0/unstable +' apt search foo --with-source ./incoming/foo_1.0_amd64.deb + +testsuccess aptcache show foo --with-source ./incoming/foo_1.0_amd64.deb +testequal 'Package: foo +Version: 1.0' head -n 2 rootdir/tmp/testsuccess.output +testsuccessequal 'foo - an autogenerated dummy foo=1.0/unstable' aptcache search foo --with-source ./incoming/foo_1.0_amd64.deb + testdpkgnotinstalled 'foo' 'foo:i386' testsuccess aptget install ./incoming/foo_1.0_i386.deb -o Debug::pkgCacheGen=1 testdpkginstalled 'foo:i386' @@ -124,6 +144,9 @@ createpkg 'leading-newline' ' ' createpkg 'trailing-newline' '' ' ' +createpkg 'double-trailing-newline' '' ' + +' echo 'Package: /pkg-/ Pin: release a=experimental @@ -132,6 +155,7 @@ Pin-Priority: 501' > rootdir/etc/apt/preferences.d/pinit testsuccess aptget install ./incoming/pkg-as-it-should-be_0_all.deb testsuccess aptget install "$(readlink -f ./incoming/pkg-leading-newline_0_all.deb)" testsuccess aptget install ./incoming/pkg-trailing-newline_0_all.deb +testsuccess aptget install ./incoming/pkg-double-trailing-newline_0_all.deb testempty apt clean if [ "$(id -u)" = '0' ]; then |