Incorporate the tests generated by AutoDoc into tst/testall.g

This commit is contained in:
Glen Whitney 2018-08-21 13:05:02 -07:00
parent 31773603de
commit 0cef163077
5 changed files with 42 additions and 5 deletions

View File

@ -20,7 +20,7 @@ your home directory.
<!--@Acknowledgements
@AutoDocPlainText -->
The authors of &RAQ; would like to acknowledge their debt to the creators of
&RIG;, an earlier package for Racks in &GAP;, chief among whom is Leandro
&RIG;, an earlier package for Racks in GAP; chief among whom is Leandro
Vendramin. &RIG; was an inspiration for the creation of &RAQ;, and using and
reading that package suggested many features needed in the development of
&RAQ;.

View File

@ -2,5 +2,8 @@
# build the documentation for RAQ via AutoDoc
LoadPackage("AutoDoc");
AutoDoc(rec(autodoc := rec(files := ["README.md"])));
AutoDoc(rec(
autodoc := rec(files := ["README.md"]),
maketest := rec(name := "tst/AutoDoc_tests.g")
));
QUIT;

13
maketest.g Normal file
View File

@ -0,0 +1,13 @@
## This file is automatically generated by AutoDoc.
## Changes will be discarded by the next call of the AutoDoc method.
AUTODOC_file_scan_list := [ "../PackageInfo.g", "../init.g", "../lib/byconj.gd", "../lib/byconj.gi", "../lib/bytable.gd", "../lib/bytable.gi", "../lib/constructions.gd", "../lib/constructions.gi", "../lib/structure.gd", "../lib/structure.gi", "../read.g" ];
LoadPackage( "GAPDoc" );
example_tree := ExtractExamples( Directory("./doc/"), "RAQ.xml", AUTODOC_file_scan_list, 500 );
RunExamples( example_tree, rec( compareFunction := "uptowhitespace" ) );
QUIT;

13
tst/AutoDoc_tests.g Normal file
View File

@ -0,0 +1,13 @@
## This file is automatically generated by AutoDoc.
## Changes will be discarded by the next call of the AutoDoc method.
AUTODOC_file_scan_list := [ "../PackageInfo.g", "../init.g", "../lib/byconj.gd", "../lib/byconj.gi", "../lib/bytable.gd", "../lib/bytable.gi", "../lib/constructions.gd", "../lib/constructions.gi", "../lib/structure.gd", "../lib/structure.gi", "../maketest.g", "../read.g" ];
LoadPackage( "GAPDoc" );
example_tree := ExtractExamples( Directory("./doc/"), "RAQ.xml", AUTODOC_file_scan_list, 500 );
RunExamples( example_tree, rec( compareFunction := "uptowhitespace" ) );
QUIT;

View File

@ -2,9 +2,17 @@
LoadPackage( "RAQ" );
TestDirectory(DirectoriesPackageLibrary("RAQ","tst"),
rec(exitGAP := true,
tst_path := DirectoriesPackageLibrary("RAQ", "tst");
TestDirectory(tst_path,
rec(exitGAP := false,
testOptions := rec(compareFunction := "uptowhitespace"))
);
FORCE_QUIT_GAP(1); # should be unreachable
auto_file := Filename(tst_path, "AutoDoc_tests.g");
if auto_file <> fail then
Read(auto_file);
else
Info(InfoWarning, 1, "Warning: Cannot find AutoDoc_tests.g. Run `gap doc/makedoc.g` in the RAQ package directory.");
fi;