]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-get-clean
various changes to increase test-coverage
[apt.git] / test / integration / test-apt-get-clean
CommitLineData
20e6965a
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture 'amd64'
9
10insertpackage 'testing' 'foo' 'all' '1'
11insertpackage 'unstable' 'foo' 'all' '2'
12insertinstalledpackage 'foo' 'all' '3'
13
14setupaptarchive
15
16# nothing to do always works
17testsuccess aptget clean
7414af7f 18testsuccess aptget clean -s
20e6965a
DK
19
20# generate some dirt and clean it up
21touch rootdir/var/lib/apt/lists/partial/http.debian.net_debian_dists_sid_main_i18n_Translation-en
04a54261 22mkdir -p rootdir/var/cache/apt/archives
20e6965a
DK
23touch rootdir/var/cache/apt/archives/foo_1_all.deb
24touch rootdir/var/cache/apt/archives/foo_2_all.deb
25touch rootdir/var/cache/apt/archives/foo_3_all.deb
26touch rootdir/var/cache/apt/archives/foo_4_all.deb
27
28testsuccess aptget clean
29
e52aad52
DK
30testfailure test -e rootdir/var/lib/apt/lists/partial/http.debian.net_debian_dists_sid_main_i18n_Translation-en
31testfailure test -e rootdir/var/cache/apt/archives/foo_1_all.deb
32testfailure test -e rootdir/var/cache/apt/archives/foo_2_all.deb
33testfailure test -e rootdir/var/cache/apt/archives/foo_3_all.deb
34testfailure test -e rootdir/var/cache/apt/archives/foo_4_all.deb
20e6965a
DK
35
36