ECHO OFF
REM Simple script to run test files
REM 
REM usage:   dotests [unixnames]
REM
REM Use "dotests unixnames" if STAR expects UNIX style filenames
REM

if A%1==Aunixnames goto unixnames
goto dosnames

REM
REM Unix style file names
REM
:unixnames
set starsrc=sta
set starlst=lis
set starexe=""
goto doit

REM
REM DOS style file names
REM
:dosnames
set starsrc=str
set starlst=lst
set starexe=bin

:doit

echo ----------------
echo Test t1:
sed2q <t1.%starsrc%
star -q t1 t1 t1

echo ----------------
echo Test t2:
sed2q <t2.%starsrc%
star -q t2 t2 t2

echo ----------------
echo Test t3:
sed2q <t3.%starsrc%
star -q t3 t3 t3

echo ----------------
echo Test t4:
sed2q <t4.%starsrc%
star -q t4 t4 t4

echo ----------------
echo Test t5:
sed2q <t5.%starsrc%
star -q t5 t5 t5

echo ----------------
echo Test t6:
sed2q <t6.%starsrc%
star -q t6 t6 t6

echo ----------------
echo Test t7:
sed2q <t7.%starsrc%
star -q t7 t7 t7

echo ----------------
echo Test t8:
echo This test should result in 1 error
sed2q <t8.%starsrc%
star -q t8 t8 t8

echo ----------------
echo  Test t9:
sed2q <t9.%starsrc%
star -q t9 t9 hp48 t9

echo ----------------
echo  Test t10:
echo  This test should result in 3 errors
sed2q <t10.%starsrc%
star -q t10 t10 hp48 t10

echo ----------------
echo  Test t11:
echo  This test should result in 1 error
sed2q <t11.%starsrc%
star -q t11 t11 t11

echo ----------------
echo  Test t12:
sed2q <t12.%starsrc%
star -q t12 t12 t12

echo ----------------
echo  Test t13:
sed2q <t13.%starsrc%
star -q t13 t13 t13

echo ----------------
echo  Test t14:
echo  This test should result in 5 errors
sed2q <t14.%starsrc%
star -q t14 t14 t14

echo ----------------
echo  Test t15:
echo  This test should result in 12 errors
sed2q <t15.%starsrc%
star -q t15 t15 t15

echo ----------------
echo  Test t16:
sed2q <t16.%starsrc%
star -q t16 t16 t16

echo ----------------
echo  Test t17:
echo  This test should result in 5 errors
sed2q <t17.%starsrc%
star -q t17 t17 t17

echo ----------------
echo  Test t18:
sed2q <t18.%starsrc%
star -q t18 t18 t18

echo ----------------
echo  Test t19:
echo  This test should result in 3 errors
sed2q <t19.%starsrc%
star -q t19 t19 t19

echo ----------------
echo  Test t20:
sed2q <t20.%starsrc%
star -q t20 t20 t20

echo ----------------
echo  Test t21:
sed2q <t21.%starsrc%
star -q t21 t21 t21

echo ----------------
echo  Test t23:
sed2q <t23.%starsrc%
star -q t23 t23 t23

echo ----------------
echo  Test t24:
sed2q <t24.%starsrc%
star -q t24 t24 hp48 t24

echo ----------------
echo  Test t25:
echo  This test should result in 2 errors if not using GNU C
sed2q <t25.%starsrc%
star -q t25 t25 t25

echo ----------------
echo  Test t26:
sed2q <t26.%starsrc%
star -q t26 t26 hp48 t26

echo ----------------
echo  Test t28:
sed2q <t28.%starsrc%
star -q t28 t28 t28

echo ----------------
echo  Test t29:
sed2q <t29.%starsrc%
star -q t29 t29 t29

echo ----------------
echo  Test t30:
sed2q <t30.%starsrc%
star -q t30 t30 t30

echo ----------------
echo  Test t31:
sed2q <t31.%starsrc%
star -q t31 t31 t31

echo ----------------
echo  Test t32:
sed2q <t32.%starsrc%
star -q t32 t32 t32

echo ----------------
echo  Test t33:
echo  This test should result in 1 error
sed2q <t33.%starsrc%
star -q t33 t33 t33

echo ----------------
echo  Test t34:
sed2q <t34.%starsrc%
star -q t34 t34 t34

echo ----------------
echo  Test t35:
sed2q <t35.%starsrc%
star -q t35 t35 hp48 t35

echo ----------------
echo  Test t36:
sed2q <t36.%starsrc%
star -q t36 t36 hp48 t36

echo ----------------
echo  Test t37:
echo  This test should result in 1 error
sed2q <t37.%starsrc%
star -q t37 t37 t37

echo ----------------
echo  Test t38:
echo  This test should result in 4 errors if not GNU C
sed2q <t38.%starsrc%
star -q t38 t38 t38

echo ----------------
echo  Test t48:
echo  This test should result in 1 error if not GNU C
sed2q <t48.%starsrc%
star -q t48 t48 hp48 t48

echo ----------------
echo Tests completed
echo Cleaning up...

del t?.%starlst%
del t??.%starlst%

del t?.%starexe%
del t??.%starexe%
