]> git.saurik.com Git - apt.git/blob - test/integration/test-apt-get-install-deb
improve partial/ cleanup in abort and failure cases
[apt.git] / test / integration / test-apt-get-install-deb
1 #!/bin/sh
2 set -e
3
4 TESTDIR=$(readlink -f $(dirname $0))
5 . $TESTDIR/framework
6
7 setupenvironment
8 configarchitecture "i386"
9
10 # regression test for #754904
11 testfailureequal 'E: Unable to locate package /dev/null' aptget install -qq /dev/null
12
13 # and ensure we fail for invalid debs
14 cat > foo.deb <<EOF
15 I'm not a deb, I'm a teapot.
16 EOF
17 testfailure aptget install ./foo.deb
18 testsuccess grep '^E: Sub-process Popen returned an error code' rootdir/tmp/testfailure.output
19 testequal 'E: Encountered a section with no Package: header
20 E: Problem with MergeLister for ./foo.deb
21 E: The package lists or status file could not be parsed or opened.' tail -n 3 rootdir/tmp/testfailure.output
22
23 # fakeroot is currently not found, framwork needs updating
24 buildsimplenativepackage 'foo' 'all' '1.0'
25 testdpkgnotinstalled 'foo'
26 testsuccess aptget install ./incoming/foo_1.0_all.deb
27 testdpkginstalled 'foo'