testInstalledPackage          package:tools          R Documentation

_T_e_s_t _I_n_s_t_a_l_l_e_d _P_a_c_k_a_g_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     These functions allow an installed package to be tested, or all
     base and recommended packages.

_U_s_a_g_e:

     testInstalledPackage(pkg, lib.loc = NULL, outDir = ".",
                          types = c("examples", "tests", "vignettes"))

     testInstalledPackages(outDir = ".", errorsAreFatal = TRUE,
                           scope = c("both", "base", "recommended"),
                           types = c("examples", "tests", "vignettes"))

     testInstalledBasic(scope = c("basic", "devel", "both"))

_A_r_g_u_m_e_n_t_s:

     pkg: name of an installed package.

 lib.loc: library path(s) in which to look for the package.  See
          'library'.

  outDir: the directory into which to write the ouptut files: this
          should already exist.

   types: type(s) of tests to be done.

errorsAreFatal: logical: should testing terminate at the first error?

   scope: Which set(s) should be tested?

_D_e_t_a_i_l_s:

     These tests depend on having the package example files installed
     (which is the default).  If package-specific tests are found in a
     'tests' directory they can be tested: these are not installed by
     default, but wlll be if 'R CMD INSTALL --install-tests' was used. 
     Finally, the R code in any vignettes can be extracted and tested.

     Package tests are run in a 'pkg-tests' subdirectory of 'outDir',
     and leave their output there.

     'testInstalledBasic' runs the basic tests, if installed.  This
     should be run with 'LC_COLLATE=C' set: the function tries to set
     this by it may not work on all OSes.

     The package-specific tests for the base and recommended packages
     are not normally installed, but 'make install-tests' is provided
     to do so (as well as the basic tests).

_V_a_l_u_e:

     Invisbly '0L' for success, '1L' for failure.

