test-apt-get-install-deb 880 B

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