File: test.sh

package info (click to toggle)
bomstrip 9-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 260 kB
  • sloc: pascal: 41; cpp: 34; ansic: 34; java: 33; python: 31; sh: 24; makefile: 19; perl: 7; php: 6; ruby: 6; haskell: 6; awk: 2; sed: 1
file content (16 lines) | stat: -rwxr-xr-x 280 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

test -z "$BOM" && BOM='ocaml ./bomstrip.ocaml'
test -z "$BOMFILES" && BOMFILES='bom0 bom1 nobom0 nobom1 nobom2'

res=0
for f in $BOMFILES; do
	$BOM < "$f" > "r$f"
	if ! cmp "r$f" correct/"r$f"; then
		echo "$f is wrong"
		res=1
	else
		rm -f "r$f"
	fi
done
exit "$res"