From 224c9211c06b084eb9583708860ca1fff0e456ad Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 25 Jan 2017 15:46:55 +0000 Subject: [PATCH] test suite: overwrite-chkclog: test UNRELEASED handling. Signed-off-by: Ian Jackson --- debian/changelog | 3 +++ tests/tests/overwrite-chkclog | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/debian/changelog b/debian/changelog index d5bef7be..6d9f233b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ dgit (3.9~) unstable; urgency=medium is not UNRELEASED. This could easily happen if this release was being made from a git branch which predates the previous package upload. + Test suite: + * overwrite-chkclog: test UNRELEASED handling. + -- dgit (3.8) unstable; urgency=medium diff --git a/tests/tests/overwrite-chkclog b/tests/tests/overwrite-chkclog index 3544390a..fee21816 100755 --- a/tests/tests/overwrite-chkclog +++ b/tests/tests/overwrite-chkclog @@ -23,6 +23,17 @@ git merge dgit/dgit/stable git checkout master which EDITOR=: git commit +perl -i~ -pe 's/^(\w+ \(\S+\)) stable/$1 UNRELEASED/ if $.>1' debian/changelog +git add debian/changelog +git commit -m 'UNRELEASED changelog' + +t-dgit -wgf build + +t-expect-fail E:'Distribution.*is UNRELEASED' \ +t-dgit push --overwrite stable + +git revert --no-edit 'HEAD^{/UNRELEASED changelog}' + t-dgit -wgf build perl -i~ -pe 's/^(\w+ \(\S+)(\) stable)/$1+X$2/ if $.>1' debian/changelog -- 2.30.2