SASUnit Examples  Version 1.2.1
File List
Here is a list of all documented files with brief descriptions:
o*_sasunit_abspath.sasCheck whether &i_path is absolute or empty. If not, append to &i_root
o*_sasunit_asserts.sasCalled by assert macros, fills table tst
o*_sasunit_checklog.sasCheck log for errors or warnings
o*_sasunit_checkscenario.sasDetermine whether a test scenario has to be executed
o*_sasunit_copydir.sasCopy a complete directory tree. Uses Windows XCOPY or Unix cp
o*_sasunit_copyfile.sasCopy file byte by byte
o*_sasunit_delfile.sasDelete an external file if it exists
o*_sasunit_deltempfiles.sasDelete all SAS datasets in the form WORK.DATAxxx, see tempFileName.sas
o*_sasunit_detectsymbols.sasDetermine the language dependant symbols used for NOTE, ERROR, WARNING in the SAS log
o*_sasunit_dir.sasGenerates a dataset with the names of all files in a directory or directory tree. Wildcards may be used to specify the files to be included
o*_sasunit_doc.sasThis is the readme file for version 1.2 of SASUnit, the Unit testing framework for SAS(R) programs, copyright 2010, 2012 HMS Analytical Software GmbH, http://www.analytical-software.de
o*_sasunit_existdir.sasCheck whether directory exists
o*_sasunit_existvar.sasDetermines whether a certain variable, optionally of a certain type, exists in a SAS dataset
o*_sasunit_getabspathcomponents.sasOf a given absolute file path (with / as dir separator), extract the file name and the path to the file (without file name) Example: The absolute path C:/temp/test.sas splitted into the two strings C:/temp and test.sas
o*_sasunit_getautocallnumber.sasLook for a specific program in all of the autocall libraries and return the number of the library (0..9) or 10 if not found.
For autocall library numbering see initsasunit.sas
o*_sasunit_getextension.sasGet file extension including the separating dot
o*_sasunit_getpgmdesc.sasProgrammbeschreibung aus dem Doxygen-Brief-Tag ermitteln
o*_sasunit_handleerror.sasCheck for errors and set status code and messages
o*_sasunit_initerrorhandler.sasInitialize error handling, see _sasunit_handleError.sas
o*_sasunit_loadenvironment.sasInitialize runtime environment (macro symbols and librefs / / filerefs)
o*_sasunit_mkdir.sasCreate a directory, if it does not exist The containing directory must exist
o*_sasunit_nls.sasMacro symbols for national language support
o*_sasunit_nobs.sasReturns number of observations in a SAS dataset
o*_sasunit_oscmds.sasSet global macro variables for OS commands
o*_sasunit_reportautonhtml.sasCreate a list of units under test for HTML report
o*_sasunit_reportcashtml.sasCreate a list of test cases for HTML report
o*_sasunit_reportcmphtml.sasCreate HTML report for assertColumns
o*_sasunit_reportdetailhtml.sasCreate page with detail information of a test case in HTML format
o*_sasunit_reportfooterhtml.sasCreate footer area of an HTML page for reporting
o*_sasunit_reportframehtml.sasCreate frame page for HTML report
o*_sasunit_reportheaderhtml.sasCreate HTML header for a page in the HTML report
o*_sasunit_reporthomehtml.sasCreate home page of HTML report
o*_sasunit_reportlibraryhtml.sasCreate HTML pages for assertLibrary
o*_sasunit_reportloghtml.sasLog-File in HTML umwandeln
o*_sasunit_reportmanhtml.sasCopy reports for assertReport and create frame page for comparison where necessary (if two reports have been specified)
o*_sasunit_reportpagetophtml.sasCreate HTML header, tabs and title of an HTML page
o*_sasunit_reportscnhtml.sasCreate list of test scenarios for HTML report
o*_sasunit_reporttabshtml.sasCreate tabs on HTML page for report
o*_sasunit_reporttcghtml.sasProcesses the otput of the MCOVERAGE and MCOVERAGELOC system options available in SAS 9.3 in order to assess test coverage.
A html representation of a given macro source code file is generated, showing which lines of code were executed during tests
o*_sasunit_reporttreehtml.sasCreate the table of contents on the left side of the HTML report as a tree
o*_sasunit_scenario.sasInitialize a test scenario, see initSASUnit.sas. _sasunit_scenario.sas is used to initialize the SAS session spawned by runSASUnit.sas
o*_sasunit_stdpath.sasStandardizes a path makes it relative to a root path
o*_sasunit_tempfilename.sasCreates a unique name for a temporary dataset in the form WORK.DATAxxx, where xxx is a consecutive integer
o*_sasunit_termscenario.sasClose the last test case at the end of a test scenario
o*_sasunit_timestamp.sasReturn a formatted timestamp string from a specified datetime value or from the current time
o*_sasunit_xcmd.sasRun an operation system command
o*assertcolumns.sasCheck whether there are differences between the values of the columns of two sas data sets (PROC COMPARE)
o*assertequals.sasCheck whether there are differences between the value of a macro variable and an expected character string
o*assertlibrary.sasCheck whether all files are identical in the libraries i_expcected and i_actual
o*assertlog.sasCheck whether errors or warnings appear in the log
o*assertlogmsg.sasCheck whether a certain message appears in the log
o*assertperformance.sasCheck whether runtime of the testcase is below or equal a given limit
o*assertreport.sasCheck whether a report file exists and was created during the current SAS session
o*boxplot.sasCreate boxplot for two groups
o*boxplot_test.sasTests for boxplot.sas
o*doxygroups.sasNo source code - only file grouping for Doxygen
o*endtestcall.sasEnds an invocation of a program under test
o*endtestcase.sasEnds a test case
o*generate.sasPartition a SAS dataset by groups, one data set per group
o*generate_test.sasTests for generate.sas
o*getvars.sasReturn variable names for a SAS dataset
o*getvars_test.sasTests for getvars.sas
o*initsasunit.sasInitialization of a test suite that may comprise several test scenarios
o*inittestcase.sasStart of a new test case that comprises an invocation of a program under test and one or more assertions
o*nobs.sasReturn number of observations in a SAS dataset
o*nobs_test.sasTests for nobs.sas - has to fail!
o*regression.sasLinear regression analysis - example for SASUnit
o*regression_test.sasTests for regression.sas
o*report_de.sasCreate german report in separate subfolder
o*reportsasunit.sasCreation of a test report
o*run_all.sasRun all test scenarios for SASUnit example project
\*runsasunit.sasInvokes one or more test scenarios