Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch tst/testall.g to use TestDirectory #4

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 5 additions & 38 deletions tst/testall.g
Original file line number Diff line number Diff line change
@@ -1,40 +1,7 @@
TestMyPackage := function( pkgname )
local pkgdir, testfiles, testresult, ff, fn;
LoadPackage( pkgname );
pkgdir := DirectoriesPackageLibrary( pkgname, "tst" );
LoadPackage( "FinIng" );

# Arrange chapters as required
testfiles := [
"tst_regular13system.tst",
"tst_segrevariety.tst",
"tst_hermitianspreads.tst",
"tst_andrebruckbose.tst",
"tst_titsovoid.tst",
"tst_finingorbits.tst",
"tst_enumerators.tst"
];

testresult:=true;
for ff in testfiles do
fn := Filename( pkgdir, ff );
Print("#I Testing ", fn, "\n");
if not Test( fn, rec(compareFunction := "uptowhitespace") ) then
testresult:=false;
fi;
od;
if testresult then
Print("#I No errors detected while testing package ", pkgname, "\n");
QUIT_GAP(0);
else
Print("#I Errors detected while testing package ", pkgname, "\n");
QUIT_GAP(1);
fi;
end;

# Set the name of the package here
Print("EXecuting this file\n");

TestMyPackage( "fining" );

QUIT_GAP(0);
TestDirectory(DirectoriesPackageLibrary( "FinIng", "tst" ),
rec(exitGAP := true,
testOptions := rec(compareFunction := "uptowhitespace") ) );

FORCE_QUIT_GAP(1); # if we ever get here, there was an error