chiark / gitweb /
generate: Introduce od
[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         i=$f
13         o=$f.tmp
14         sed <$i >$o '
15                 /^# doctests:/ {
16                         r '"${f%/*}/doctest.mk.part"'
17                         a
18                 }
19         '
20         diff -u $f.tmp ${f%.expected}.tmp
21 done
22
23 echo ok.