# CD into the testown folder
# start agena
# type "run 'testall.agn'"

ttime := time();

testfile := proc(what::string) is
   run(what);
   print(strings.repeat('-', 70));
end;

if os.islinux() then
   print('Valgrind 3.12.0 is recommended to run the checks.\n')
fi;

testfile('basics.agn');
testfile('math.agn');
testfile('strings.agn');
testfile('tables.agn');
testfile('sets.agn');
testfile('seqs.agn');
testfile('pairs.agn');
testfile('regs.agn');
testfile('stack.agn');
testfile('readlib.agn');
testfile('misc.agn');
if os.system()[1] in {'SunOS', 'Windows', 'Linux', 'Darwin'} then
   testfile('netcheck.agn')
fi

print('\nTotal: ' & time()-ttime & ' seconds.')

clear ttime, testfile;
