From ae6ea526d65eb560b825677e8aac4a3fa15934e4 Mon Sep 17 00:00:00 2001
From: David Kalnischkies <kalnischkies@gmail.com>
Date: Wed, 27 Jul 2011 23:50:55 +0200
Subject: * apt-pkg/deb/deblistparser.cc:   - do not assume that the last char
 on a line is a \n (Closes: #633350)

---
 ...est-bug-633350-do-not-kill-last-char-in-Release | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100755 test/integration/test-bug-633350-do-not-kill-last-char-in-Release

(limited to 'test')

diff --git a/test/integration/test-bug-633350-do-not-kill-last-char-in-Release b/test/integration/test-bug-633350-do-not-kill-last-char-in-Release
new file mode 100755
index 000000000..3d3835507
--- /dev/null
+++ b/test/integration/test-bug-633350-do-not-kill-last-char-in-Release
@@ -0,0 +1,27 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+insertpackage 'unstable' 'cool' 'amd64' '1.0'
+
+setupaptarchive 2> /dev/null
+
+echo 'NotAutomatic: yes' >> aptarchive/dists/unstable/Release
+
+signreleasefiles
+find aptarchive/dists -name 'InRelease' -delete
+
+rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt
+
+OUTPUT="$(aptget update 2>&1)"
+msgtest 'Check that parsing happens without warnings' 'with missing newline'
+if echo "${OUTPUT}" | grep '^W:' > /dev/null; then
+	msgfail
+	echo "${OUTPUT}"
+else
+	msgpass
+fi
-- 
cgit v1.2.3