Skip to content

Commit

Permalink
Document the TestFiles option to newPackage
Browse files Browse the repository at this point in the history
  • Loading branch information
d-torrance committed Sep 29, 2024
1 parent c8efd14 commit 93c1355
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions M2/Macaulay2/packages/Macaulay2Doc/functions/check-doc.m2
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ Node
One provides tests using the @TO symbol TEST@ function following the @TO beginDocumentation@ call in the source
of the package.

Optionally, one can store all tests in a @TT "tests.m2"@ directory under the auxiliary subdirectory of
the package and load the file from the main package source file.
Optionally, one can store tests as files in the auxiliary subdirectory of
the package and include their filenames in the @TO TestFiles@ option
to @TO newPackage@.

For example, to run the tests for the @TO "LLLBases :: LLLBases"@ package (Lenstra-Lenstra-Lovasz bases), use:
CannedExample
Expand Down
4 changes: 4 additions & 0 deletions M2/Macaulay2/packages/Macaulay2Doc/functions/package-doc.m2
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ Node
[newPackage, PackageExports]
[newPackage, PackageImports]
[newPackage, Reload]
[newPackage, TestFiles]
[newPackage, UseCachedExampleOutput]
[newPackage, Version]
Name
Expand Down Expand Up @@ -338,6 +339,9 @@ Node
but a backup will be made and the user's settings for the surviving options will be retained.
Reload=>Boolean
whether to reload the package, if it has been loaded before
TestFiles=>List
of strings, names of auxiliary files to be run as part of the package's
test suite when calling @TO check@
Outputs
:Package
the new package
Expand Down

0 comments on commit 93c1355

Please sign in to comment.