Debian Codegraph @

test/doctest-auto

raw
1 #!/bin/bash
2
3 # Print (on stdout) BATS tests to run doctests on each file in lib/.
4
5 set -e -o pipefail
6
7 # Ensure reproducible output (#1849)
8 export LC_ALL=C
9
10 cat <<EOF
11 # AUTOGENERATED -- DO NOT EDIT
12
13 load ../common
14
15 setup () {
16 scope standard
17 [[ \$CH_TEST_BUILDER = ch-image ]] || skip 'ch-image only'
18 }
19
20 EOF
21
22
23 for f in ../lib/*.py; do
24 m=$(basename "$f")
25 m=${m%%.py}
26 if [[ $m == version ]]; then
27 continue
28 fi
29 cat <<EOF
30
31 @test 'doctest: $m' {
32 ./doctest $m
33 }
34 EOF
35 done