chiark / gitweb /
test suite: Break out t-dgit-manpage
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Aug 2017 11:14:41 +0000 (12:14 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 4 Aug 2017 22:06:18 +0000 (23:06 +0100)
No functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib
tests/tests/sbuild-gitish

index 0996d3e57b8636213fec97a4eea8b4aab8ddbef1..8fd35147431f884637c195ddde9ba41b34cfd58f 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -419,6 +419,17 @@ t-dgit () {
 '
 }
 
+t-dgit-manpage () {
+       local section=$1
+       local page=$2
+       (export LC_ALL=C.UTF-8
+        if [ "$DGIT_TEST_INTREE" ]; then
+               make -C $DGIT_TEST_INTREE $page.$section.view
+        else
+               man $section $page
+        fi)
+}
+
 t-diff-nogit () {
        diff --exclude=.git --exclude=.pc -ruN $*
 }
index 7156d0e3dd2cf996bfe137aca77a98e5903c45bb..6e497b2d47e3ade1218e8bbe65f1cd69d9c92916 100755 (executable)
@@ -10,12 +10,7 @@ t-tstunt-parsechangelog
 t-prep-newpackage example 1.1
 
 buildrune=$(
-       (export LC_ALL=C.UTF-8
-        if [ "$DGIT_TEST_INTREE" ]; then
-               make -C $DGIT_TEST_INTREE dgit-user.7.view
-        else
-               man 7 dgit-user
-        fi) | \
+       t-dgit-manpage 7 dgit-user | \
        perl -ne '
                next unless m/^ +Using sbuild$/ .. 0;
                next unless m/^ +\%/ .. 0;