chiark / gitweb /
tests/filter/check: Enable pipefail
[subdirmk.git] / tests / filter / check
index 2a5a8ee..35db4ed 100755 (executable)
@@ -1,9 +1,21 @@
-#!/bin/sh
+#!/bin/bash
 set -e
+set -o pipefail
 
 cd tests/filter
+
+expand <../../README | ./extract-doctest . >/dev/null
+
 ../../generate sub/dir
 files=$(find -name \*.expected)
-for f in $files; do diff -u $f ${f%.expected}.tmp; done
+for f in $files; do
+       sed <$f >$f.tmp '
+               /^# doctests:/ {
+                       r '"${f%/*}/doctest.mk.part"'
+                       a
+               }
+       '
+       diff -u $f.tmp ${f%.expected}.tmp
+done
 
 echo ok.