]>
git.saurik.com Git - apt.git/blob - test/integration/test-apt-edit-sources
4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
8 configarchitecture 'native'
10 echo 'Dir::Bin::Editor "cat";' > rootdir/etc/apt/apt.conf.d/editor.conf
12 echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list.d/rocks.list
13 testsuccessequal "$(cat rootdir/etc/apt/sources.list.d/rocks.list)" apt edit-sources rocks.list
21 echo 'Dir::Bin::Editor ".
/editor.sh
";' > rootdir/etc/apt/apt.conf.d/editor.conf
22 testsuccess apt edit-sources blub.list
23 testfailure test -e 'rootdir/etc/apt/sources.list.d/blub.list'
28 echo '#comment' > "\
$1"
30 testsuccess apt edit-sources blub.list
31 testfilestats 'rootdir/etc/apt/sources.list.d/blub.list' '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:644"
33 echo 'Dir::Bin::Editor "cat";' > rootdir/etc/apt/apt.conf.d/editor.conf
34 echo 'blub' > rootdir/etc/apt/sources.list.d/blub.list
35 testfailure apt edit-sources blub.list --assume-no
37 echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list.d/blub.list
38 touch -m -d 'now + 1 hour' rootdir/etc/apt/sources.list.d/blub.list
39 testwarning apt edit-sources blub.list --assume-no