<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>check -- perform tests of a package</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_informing_spothers_spabout_spyour_sppackage.html">next</a> | <a href="_writing_spdocumentation.html">previous</a> | <a href="_informing_spothers_spabout_spyour_sppackage.html">forward</a> | <a href="_writing_spdocumentation.html">backward</a> | <a href="_creating_spa_sppackage.html">up</a> | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <div><a href="index.html" title="">Macaulay2Doc</a> > <a href="___The_sp__Macaulay2_splanguage.html" title="">The Macaulay2 language</a> > <a href="_packages.html" title="">packages</a> > <a href="_creating_spa_sppackage.html" title="">creating a package</a> > <a href="_check.html" title="perform tests of a package">check</a></div> <hr/> <div><h1>check -- perform tests of a package</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="single"><a href="_using_spfunctions_spwith_spoptional_spinputs.html">Optional inputs</a>:<ul><li><span><a href="_check.html">UserMode => ...</a>, -- perform tests of a package</span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><p>It is important for package authors to provide tests to insure that the package is functioning properly. One provides tests using <a href="___T__E__S__T.html" title="package item: register a test of the package">TEST</a> in the <a href="_begin__Documentation.html" title="package item: start documentation section">beginDocumentation</a> section.</p> <div><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>check P</tt></div> </dd></dl> </div> </li> <li>Inputs:<ul><li><span><tt>P</tt>, <span>a <a href="___Package.html">package</a></span> or <span>a <a href="___String.html">string</a></span></span></li> <li><span><tt>UserMode => </tt><span><span>default value null</span>, if <a href="_true.html" title="">true</a>, then do not give the <tt>-q</tt> option to <tt>M2</tt> when running tests, thereby allowing it to load the user's <a href="_initialization_spfile.html" title="">initialization file</a>, allowing it to load packages previously installed in the user's <a href="_application__Directory.html">application directory</a>, and allowing packages it loads to read their configuration files from the the user's <a href="_application__Directory.html">application directory</a>. If <a href="_false.html" title="">false</a>, then do give the option. If <a href="_null.html" title="the unique member of the empty class">null</a>, then propagate the option from the current <a href="_command__Line.html" title="the command line arguments">commandLine</a>, if one occurs there.</span></span></li> </ul> </li> <li>Consequences:<ul><li>The tests in the package </li> <li><tt>P</tt></li> <li> are run (in separate Macaulay2 processes), and any errors are reported.</li> </ul> </li> </ul> <p>For example, to run the tests for the LLLBases package (Lenstra-Lenstra-Lovasz bases) do the following.</p> <pre>installPackage "LLLBases" check LLLBases</pre> <p>Alternatively, if the package is already installed somewhere accessible, one can do the following.</p> <pre>check "LLLBases"</pre> </div> <div><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>check(i,P)</tt></div> </dd></dl> </div> </li> <li>Inputs:<ul><li><span><tt>i</tt>, <span>an <a href="___Z__Z.html">integer</a></span>, the number of the test to run</span></li> <li><span><tt>P</tt>, <span>a <a href="___Package.html">package</a></span> or <span>a <a href="___String.html">string</a></span></span></li> <li><span><tt>UserMode => </tt><span><span>default value null</span>, if <a href="_true.html" title="">true</a>, then do not give the <tt>-q</tt> option to <tt>M2</tt> when running tests, thereby allowing it to load the user's <a href="_initialization_spfile.html" title="">initialization file</a>, allowing it to load packages previously installed in the user's <a href="_application__Directory.html">application directory</a>, and allowing packages it loads to read their configuration files from the the user's <a href="_application__Directory.html">application directory</a>. If <a href="_false.html" title="">false</a>, then do give the option. If <a href="_null.html" title="the unique member of the empty class">null</a>, then propagate the option from the current <a href="_command__Line.html" title="the command line arguments">commandLine</a>, if one occurs there.</span></span></li> </ul> </li> <li>Consequences:<ul><li>The i-th test in the package P is run (in separate Macaulay 2 processes), and any errors are reported.</li> </ul> </li> </ul> <p>For example, to run the tests for the LLLBases package (Lenstra-Lenstra-Lovasz bases) do the following.</p> <pre>installPackage "LLLBases" check LLLBases</pre> <p>Alternatively, if the package is already installed somewhere accessible, one can do the following.</p> <pre>check "LLLBases"</pre> </div> </div> </div> <div class="single"><h2>Caveat</h2> <div>Currently, if the package was only partially loaded because the documentation was obtainable from a database (see <a href="_begin__Documentation.html" title="package item: start documentation section">beginDocumentation</a>), then the package will be reloaded, this time completely, to ensure that all tests are considered; this may affect user objects of types declared by the package, as they may be not usable by the new instance of the package. In a future version, either the tests and the documentation will both be cached, or neither will.</div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_packages.html" title="">packages</a></span></li> <li><span><a href="_install__Package.html" title="load and install a package and its documentation ">installPackage</a> -- load and install a package and its documentation </span></li> <li><span><a href="_load__Package.html" title="load a package">loadPackage</a> -- load a package</span></li> </ul> </div> <div class="waystouse"><h2>Ways to use <tt>check</tt> :</h2> <ul><li>check(Package)</li> <li>check(String)</li> <li>check(ZZ,Package)</li> <li>check(ZZ,String)</li> </ul> </div> </div> </body> </html>