summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2018-08-15 00:23:37 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2018-08-19 17:25:43 +0200
commit6df0d31d60d6ad0b706b15d57bd433d036cce82f (patch)
tree8f536e1f6bfebf35cb949ab725a2d7e01a5369a8 /test
parentb172d6afb88296d7794e6a8f28d379d969d18521 (diff)
test: Supports records larger than 32kb in 'apt show'
The 1.7 series rework of show started in bf53f39c9a0221b670ffff74053ed36fc502d5a0 resolved the issue already, but its always a good idea to at least bring the tests along so that we hopeful do not regress in the future with another rewrite. Tests: #905527 Gbp-Dch: Ignore
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-apt-cli-show33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/integration/test-apt-cli-show b/test/integration/test-apt-cli-show
index 935d93d86..a37dbd8e6 100755
--- a/test/integration/test-apt-cli-show
+++ b/test/integration/test-apt-cli-show
@@ -7,11 +7,19 @@ TESTDIR="$(readlink -f "$(dirname "$0")")"
setupenvironment
configarchitecture 'i386' 'amd64'
+generatelotsofnames() {
+ for i in $(seq 0 10000); do
+ printf ', this-is-a-long-pkg-name-%s (= 0.a.long.version)' "$i"
+ done
+}
+
DESCR='Some description
That has multiple lines'
insertpackage 'unstable' 'foo' 'all' '1.0' '' '' "$DESCR"
insertpackage 'unstable' 'bar' 'i386,amd64' '1' '' '' "$DESCR"
insertpackage 'unstable' 'big' 'i386,amd64' '1' 'Installed-Size: 4129421' '' "$DESCR"
+insertpackage 'unstable' 'large' 'all' '1' "Provides: pkga$(generatelotsofnames)" '' "$DESCR"
+insertpackage 'unstable' 'large2' 'all' '1' "Provides: foobar, pkga$(generatelotsofnames)" '' "$DESCR"
insertinstalledpackage 'foo' 'all' '1.0'
setupaptarchive
@@ -66,6 +74,31 @@ Description: Some description
That has multiple lines
" apt show big:amd64
+testsuccessequal "Package: large
+Version: 1
+Priority: optional
+Section: other
+Maintainer: Joe Sixpack <joe@example.org>
+Installed-Size: 43.0 kB
+Provides: pkga$(generatelotsofnames)
+Download-Size: unknown
+APT-Sources: file:$APTARCHIVE unstable/main all Packages
+Description: Some description
+ That has multiple lines
+" apt show large
+testsuccessequal "Package: large2
+Version: 1
+Priority: optional
+Section: other
+Maintainer: Joe Sixpack <joe@example.org>
+Installed-Size: 43.0 kB
+Provides: foobar, pkga$(generatelotsofnames)
+Download-Size: unknown
+APT-Sources: file:$APTARCHIVE unstable/main all Packages
+Description: Some description
+ That has multiple lines
+" apt show large2
+
# this is the default, but disabled by the testcases
testsuccess apt show foo -o Apt::Cmd::Disable-Script-Warning=0
cp rootdir/tmp/testsuccess.output aptshow.output