# Quick test that most of the components are in place and nominally functional.

# build the program, checking that sr can call srl
0 sr gries.sr

# check for correct execution
0 run input1
0 run input2
0 run input3
0 run input4
0 run input5

# check that srm is installed and doesn't bomb, and that the Makefile is legal.
# do "make ls"; making the SR program might bomb due to wrong paths or versions.
# run "make" output through sed to remove leading tabs added by Encore.
0 srm
0 make -n ls cleanx >Make.tmp 2>&1
0 sed 's/^\	//' Make.tmp >Make.out
0 cmp Make.std Make.out
# now that we know it's legal, see that it's what we expected.
0 cmp Makefile.std Makefile

# check that srtex functions and produces non-null output
0 srtex -p gries.sr
0 test -s Texer.out

# the following comparison will fail whenever srtex's output changes --
# then need to run through tex and verify visually
0 cmp Texer.std Texer.out

# clean up now, in case of srgrind failure below
0 rm -rf Interfaces Makefile exe core *.out *.tmp *.[chos]

# check that srgrind functions, at least rudimentarily
# MAKE SURE THIS IS THE LAST TEST -- the documentation says it's okay to fail
0 srgrind gries.sr
0 grep remarkable Grinder.out >/dev/null
0 rm -rf *.out
