File: do-checks

package info (click to toggle)
bock 0.20.2.1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,228 kB
  • ctags: 1,370
  • sloc: ansic: 7,367; java: 5,553; yacc: 963; lex: 392; makefile: 243; sh: 90; perl: 42
file content (46 lines) | stat: -rwxr-xr-x 984 bytes parent folder | download | duplicates (3)
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
39
40
41
42
43
44
45
46
#! /bin/sh

set -e

BOCK=../bock
BOCKLIB=../lib
export BOCK BOCKLIB

JCOMP="sh ../jcomp"

from() {
	echo '***' Running test from ${1}...
}

mkdir -p output

echo '***' Running tests from \"The Java Language Specification\"...

from p5
${JCOMP} -o output/p5 -s Test p5.java
./output/p5 Hello, world. > output/p5.out 2>&1
diff p5.good.output output/p5.out

from p26
echo '*** (not checking output)'
${JCOMP} -o output/p26 -s testPackage.Test p26*.java
./output/p26 > output/p26.out 2>&1

from p32
${JCOMP} -o output/p32 -s Test p32.java
./output/p32 > output/p32.out 2>&1
diff p32.good.output output/p32.out

echo '* Not running test from p35'

#from p38
#${JCOMP} -o output/p38 -s Test p38.java
#./output/p38 > output/p38.out 2>&1
#diff p38.good.output output/p38.out

echo '***' Running miscellaneous tests...

echo '***' Compiling and running jlex and checking output matches JDK...
${JCOMP} -o jlex -s JLex.Main jlex.java
./jlex sample.lex
diff sample.lex.java.good sample.lex.java