summaryrefslogtreecommitdiff
path: root/test/integration/test-bug-407511-fail-invalid-default-release
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 17:52:22 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 17:52:22 +0200
commit74b220028595342028e3309002e4ec359af328f9 (patch)
tree0132b7fd4b4f5fa5e2dbce1f2e0fbeeff2c8e101 /test/integration/test-bug-407511-fail-invalid-default-release
parent650faab01603caac04494d54cf6b10a65c00ea13 (diff)
parentb11fe392b2245354591296df88c3be2e6218af12 (diff)
merge with debian/experimental
Diffstat (limited to 'test/integration/test-bug-407511-fail-invalid-default-release')
-rwxr-xr-xtest/integration/test-bug-407511-fail-invalid-default-release47
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*