chiark / gitweb /
test suite: gitattributes: try to guess some attr names from manpage
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 16 Jan 2017 01:43:19 +0000 (01:43 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 16 Jan 2017 01:44:24 +0000 (01:44 +0000)
This may allow the test suite to detect if git gains new attributes.
The worst case is that we add unknown attributes to our test package.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/tests/control
tests/tests/gitattributes

index 5563a80..1528fe0 100644 (file)
@@ -13,7 +13,7 @@ Restrictions: x-dgit-intree-only x-dgit-git-only
 
 Tests: gitattributes
 Tests-Directory: tests/tests
-Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, bsdgames
+Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, bsdgames, man-db, git-man
 
 Tests: defdistro-mirror mirror mirror-debnewgit mirror-private
 Tests-Directory: tests/tests
index 2e24bba..0f71c33 100755 (executable)
@@ -3,6 +3,7 @@ set -e
 . tests/lib
 
 t-dependencies bsdgames
+t-dependencies man-db git-man
 t-tstunt-parsechangelog
 
 t-archive-none example
@@ -56,6 +57,15 @@ badattr export-subst
 badattr delta
 badattr encoding no-such-encoding
 
+man gitattributes \
+| perl -ne 'print $1,"\n" if m/^ *(\w[-a-z]*)$/' \
+> grepped-attrs
+
+exec <grepped-attrs
+while read attr; do
+       badattr $attr
+done
+
 sha256sum af/* >sums
 
 # ----- common to source formats -----