summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-install-deb
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2018-04-12 09:59:47 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2018-05-11 17:58:46 +0200
commit6085ab7488326cfed8f82e07eefcbc2dc40d4bea (patch)
treed7e0241441f329b0ea00b25eded6f1fce6e8903f /test/integration/test-apt-get-install-deb
parentbf53f39c9a0221b670ffff74053ed36fc502d5a0 (diff)
Support local files as arguments in show command
Now that --with-source is supported in show we can go a little further and add the "syntactic sugar" of supporting deb-files on the commandline directly to give users an alternative to remembering dpkg -I for deb files & as a bonus apt also works on changes files. Most of the code churn is actually to deal with cases probably not too common in reality like mixing packages and deb-files on the commandline and getting the right order for these multiple records. Closes: 883206
Diffstat (limited to 'test/integration/test-apt-get-install-deb')
-rwxr-xr-xtest/integration/test-apt-get-install-deb31
1 files changed, 26 insertions, 5 deletions
diff --git a/test/integration/test-apt-get-install-deb b/test/integration/test-apt-get-install-deb
index ff103a514..844f1d7c5 100755
--- a/test/integration/test-apt-get-install-deb
+++ b/test/integration/test-apt-get-install-deb
@@ -48,16 +48,37 @@ E: Unable to correct problems, you have held broken packages." aptget install ./
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
+Version: 1.0' grep -e '^Package:' -e '^Version:' -e '^Architecture:' rootdir/tmp/testsuccess.output
+testsuccess apt show ./incoming/foo_1.0_amd64.deb
+testequal 'Package: foo
+Version: 1.0' grep -e '^Package:' -e '^Version:' -e '^Architecture:' rootdir/tmp/testsuccess.output
+testsuccess apt show foo:i386 ./incoming/foo_1.0_amd64.deb --with-source ./incoming/foo_1.0_i386.deb
+testequal 'Package: foo:i386
+Version: 1.0
+Package: foo
+Version: 1.0' grep -e '^Package:' -e '^Version:' -e '^Architecture:' rootdir/tmp/testsuccess.output
+
+testsuccess aptcache show foo --with-source ./incoming/foo_1.0_amd64.deb
+testequal 'Package: foo
+Version: 1.0
+Architecture: amd64' grep -e '^Package:' -e '^Version:' -e '^Architecture:' rootdir/tmp/testsuccess.output
+testsuccess aptcache show ./incoming/foo_1.0_amd64.deb
+testequal 'Package: foo
+Version: 1.0
+Architecture: amd64' grep -e '^Package:' -e '^Version:' -e '^Architecture:' rootdir/tmp/testsuccess.output
+testsuccess aptcache show foo:i386 ./incoming/foo_1.0_amd64.deb --with-source ./incoming/foo_1.0_i386.deb
+testequal 'Package: foo
+Version: 1.0
+Architecture: i386
+Package: foo
+Version: 1.0
+Architecture: amd64' grep -e '^Package:' -e '^Version:' -e '^Architecture:' 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'