File: run-tests

package info (click to toggle)
stx2any 1.56-2.3
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 748 kB
  • sloc: sh: 312; python: 288; lisp: 137; makefile: 126; sed: 1
file content (38 lines) | stat: -rwxr-xr-x 948 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
#This file is under the license in ../LICENSE.

export PAPERSIZE=a4
failed=""

run_test() {
param=regression/$1.param
test=regression/$1.test
./scripts/stx2any `test -f $param && cat $param` -T $2 $test | \
diff -u regression/$1.$2 - || failed="$failed $1($2)"
}

for i in regression/*.test; do
	echo Running $i ...
	base=`basename $i .test`
	for fmt in html man latex docbook-xml; do
		run_test $base $fmt
	done
done

for i in regression/*.strip_stx; do
	echo Running $i ...
	base=`basename $i .strip_stx`
	./scripts/strip_stx `cat $i` | \
	diff -u regression/$base.stripped - || failed="$failed strip_stx($base)"
done

for i in regression/*.gather_stx_titles; do
	echo Running $i ...
	base=`basename $i .gather_stx_titles`
	./scripts/gather_stx_titles `cat $i` regression/*.test | \
	diff -u regression/$base.titles - || failed="$failed gather_stx_titles($base)"
done

test -n "$failed" && echo Failed tests: $failed
test -z "$failed"