summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-02-05 20:34:40 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-02-05 20:47:19 +0000
commitbc0c5d92e3f9fff9de05afbb7519bb29c25ac74f (patch)
tree85d4e047d0b8e4c80fb4fda4a1c91e9caa27acf6 /tests
parent1e843b636c0174677314d2f180427fe68e24d671 (diff)
import-maintmangle: New test for changelog Maintainer mangling.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/tests/import-maintmangle41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/tests/import-maintmangle b/tests/tests/import-maintmangle
new file mode 100755
index 0000000..31a5f88
--- /dev/null
+++ b/tests/tests/import-maintmangle
@@ -0,0 +1,41 @@
+#!/bin/bash
+set -e
+. tests/lib
+. $troot/lib-import-chk
+
+t-tstunt-parsechangelog
+
+t-select-package example
+v=1.0
+t-worktree $v
+
+cd $p
+
+dsc=${p}_${v}.dsc
+
+chk () {
+ local perl="$1"
+ local unperl="$2"
+ git checkout master~0
+ perl -i -pe "next unless m/^ -- /; $perl" debian/changelog
+ git commit --allow-empty -a -m "perl $perl"
+ (cd ..; dpkg-source -i\.git -I.git -b $p)
+ t-dgit import-dsc ../$dsc +x
+ git checkout x~0
+ t-import-chk-authorship
+}
+
+massage () {
+ perl -i~ -pe "$unperl" "$1"
+}
+
+import_chk_changelog_massage=massage
+
+chk
+
+chk 's/Ian Jackson/Ian Jackson, SPQR/' \
+ 's/Ian Jackson, SPQR/Ian Jackson SPQR/'
+
+chk 's/Ian Jackson/"Ian Jackson, SPQR"/'
+
+t-ok