You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

37 lines
1.1 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture 'amd64'
  7. insertpackage 'testing' 'foo' 'all' '1'
  8. insertpackage 'unstable' 'foo' 'all' '2'
  9. insertinstalledpackage 'foo' 'all' '3'
  10. setupaptarchive
  11. # nothing to do always works
  12. testsuccess aptget clean
  13. testsuccess aptget clean -s
  14. # generate some dirt and clean it up
  15. touch rootdir/var/lib/apt/lists/partial/http.debian.net_debian_dists_sid_main_i18n_Translation-en
  16. mkdir -p rootdir/var/cache/apt/archives
  17. touch rootdir/var/cache/apt/archives/foo_1_all.deb
  18. touch rootdir/var/cache/apt/archives/foo_2_all.deb
  19. touch rootdir/var/cache/apt/archives/foo_3_all.deb
  20. touch rootdir/var/cache/apt/archives/foo_4_all.deb
  21. testsuccess aptget clean
  22. testfailure test -e rootdir/var/lib/apt/lists/partial/http.debian.net_debian_dists_sid_main_i18n_Translation-en
  23. testfailure test -e rootdir/var/cache/apt/archives/foo_1_all.deb
  24. testfailure test -e rootdir/var/cache/apt/archives/foo_2_all.deb
  25. testfailure test -e rootdir/var/cache/apt/archives/foo_3_all.deb
  26. testfailure test -e rootdir/var/cache/apt/archives/foo_4_all.deb