summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-24 23:05:25 +0100
committerMichael Vogt <mvo@debian.org>2014-01-24 23:05:25 +0100
commit48e48cbdc47a0b29ac1b9d2b7d4eef61be73d06d (patch)
tree6c464b7197ba374f9952aeb1571e15a1453183f2 /test
parentb18dd45f2c71fbdf5c0eef113e9e8e01f84b70a7 (diff)
parent34f7c486b10559997849c15c6b51577ec3f96bc1 (diff)
Merge remote-tracking branch 'mvo/debian/sid' into debian/experimental-no-abi-break
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-cli-upgrade34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/integration/test-apt-cli-upgrade b/test/integration/test-apt-cli-upgrade
new file mode 100755
index 000000000..163a55576
--- /dev/null
+++ b/test/integration/test-apt-cli-upgrade
@@ -0,0 +1,34 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture "i386"
+
+insertpackage 'unstable' 'foo' 'all' '2.0' 'Depends: foo-new-dependency'
+insertpackage 'unstable' 'foo-new-dependency' 'all' '2.0'
+insertinstalledpackage 'foo' 'all' '1.0'
+
+setupaptarchive
+
+APTARCHIVE=$(readlink -f ./aptarchive)
+
+# default is to allow new dependencies
+testequal "Calculating upgrade... Done
+The following NEW packages will be installed:
+ foo-new-dependency
+The following packages will be upgraded:
+ foo
+1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst foo-new-dependency (2.0 unstable [all])
+Inst foo [1.0] (2.0 unstable [all])
+Conf foo-new-dependency (2.0 unstable [all])
+Conf foo (2.0 unstable [all])" apt upgrade -qq -s
+
+# ensure
+testequal "Calculating upgrade... Done
+The following packages have been kept back:
+ foo
+0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded." apt upgrade -qq -s --no-new-pkgs