]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-407511-fail-invalid-default-release
merge with debian/experimental
[apt.git] / test / integration / test-bug-407511-fail-invalid-default-release
CommitLineData
a3bbbab7
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
7configarchitecture 'i386'
8
9insertpackage 'unstable' 'cool' 'all' '1.0-1'
10
11getcodenamefromsuite() {
12 if [ "$SUITE" = 'unstable' ]; then
13 echo -n 'sid'
14 else
15 echo -n "$SUITE"
16 fi
17}
18getreleaseversionfromsuite() {
19 if [ "$SUITE" = 'unstable' ]; then
20 echo -n '42.0'
21 else
22 echo -n '0.8.15'
23 fi
24}
25
26setupaptarchive
27
28passdist() {
29 msgtest "Test that target-release is accepted" $1
30 aptget dist-upgrade -t $1 -qq && msgpass || msgfail
31}
32
33faildist() {
34 msgtest "Test that target-release is refused" $1
35 aptget dist-upgrade -t $1 -qq 2> /dev/null && msgfail || msgpass
36}
37
38passdist unstable
39passdist sid
40faildist sidd
41faildist stable
42passdist 42.0
43passdist 42.*
44passdist 42*
45passdist 4*.0
46faildist 21.0
47faildist 21*