chiark / gitweb /
doctests: Fail on extraction if we don't understand the README
[subdirmk.git] / tests / filter / check
1 #!/bin/bash
2 set -e
3 set -o pipefail
4
5 cd tests/filter
6
7 expand <../../README | ./extract-doctest . >/dev/null
8
9 ../../generate sub/dir
10 files=$(find -name \*.expected)
11 for f in $files; do
12         sed <$f >$f.tmp '
13                 /^# doctests:/ {
14                         r '"${f%/*}/doctest.mk.part"'
15                         a
16                 }
17         '
18         diff -u $f.tmp ${f%.expected}.tmp
19 done
20
21 echo ok.