diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-26 12:25:17 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-07-26 12:25:17 +0200 |
commit | 1a51e3db1af215ffd65ab2347baead7b1179ad80 (patch) | |
tree | a90d0a88304f7654ea494ba0fe6aa4307ef5d691 /test/integration/test-bug-407511-fail-invalid-default-release | |
parent | 822b344dacd3154df859ce6dbb1cb713ed96fc44 (diff) | |
parent | 27b16a2ed9a5cfdde955a0a49cd2fd73edce09c8 (diff) |
merged from debian-sid
Diffstat (limited to 'test/integration/test-bug-407511-fail-invalid-default-release')
-rwxr-xr-x | test/integration/test-bug-407511-fail-invalid-default-release | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/integration/test-bug-407511-fail-invalid-default-release b/test/integration/test-bug-407511-fail-invalid-default-release new file mode 100755 index 000000000..d0a73af7d --- /dev/null +++ b/test/integration/test-bug-407511-fail-invalid-default-release @@ -0,0 +1,47 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +insertpackage 'unstable' 'cool' 'all' '1.0-1' + +getcodenamefromsuite() { + if [ "$SUITE" = 'unstable' ]; then + echo -n 'sid' + else + echo -n "$SUITE" + fi +} +getreleaseversionfromsuite() { + if [ "$SUITE" = 'unstable' ]; then + echo -n '42.0' + else + echo -n '0.8.15' + fi +} + +setupaptarchive + +passdist() { + msgtest "Test that target-release is accepted" $1 + aptget dist-upgrade -t $1 -qq && msgpass || msgfail +} + +faildist() { + msgtest "Test that target-release is refused" $1 + aptget dist-upgrade -t $1 -qq 2> /dev/null && msgfail || msgpass +} + +passdist unstable +passdist sid +faildist sidd +faildist stable +passdist 42.0 +passdist 42.* +passdist 42* +passdist 4*.0 +faildist 21.0 +faildist 21* |