From a3bbbab7ca5f94391b2158cfe9deb85eb335e29a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 16 Jul 2011 16:48:03 +0200 Subject: * apt-pkg/policy.cc: - emit an error on unknown APT::Default-Release value (Closes: #407511) --- .../test-bug-407511-fail-invalid-default-release | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 test/integration/test-bug-407511-fail-invalid-default-release (limited to 'test/integration/test-bug-407511-fail-invalid-default-release') 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* -- cgit v1.2.3