Home | History | Annotate | Line # | Download | only in test
README revision 1.4
      1  1.2  cgd The files in this directory with suffixes `.t', `.d', `.r' and `.err' are
      2  1.2  cgd used for testing ed.  To run the tests, set the ED variable in the Makefile
      3  1.2  cgd for the path name of the program to be tested (e.g., /bin/ed), and type
      4  1.4  alm `make'.  The tests do not exhaustively verify POSIX compliance nor do
      5  1.4  alm they verify correct 8-bit or long line support.
      6  1.4  alm 
      7  1.4  alm The test file suffixes have the following meanings:
      8  1.4  alm .t    Template - a list of ed commands from which an ed script is
      9  1.4  alm       constructed
     10  1.4  alm .d    Data - read by an ed script
     11  1.4  alm .r    Result - the expected output after processing data via an ed
     12  1.4  alm       script.
     13  1.4  alm .err  Error - invalid ed commands that should generate an error
     14  1.1  cgd 
     15  1.2  cgd The output of the tests is written to the two files err.o and scripts.o.
     16  1.2  cgd At the end of the tests, these files are grep'ed for error messages,
     17  1.2  cgd which look like:
     18  1.1  cgd 	*** The script u.ed exited abnormally ***
     19  1.1  cgd or:
     20  1.1  cgd 	*** Output u.o of script u.ed is incorrect ***
     21  1.1  cgd 
     22  1.1  cgd It is assumed that the ed being tested processes escapes (\) in file names.
     23  1.1  cgd This is so that a name starting with bang (!) can be read, via:
     24  1.1  cgd 	r \!file
     25  1.1  cgd Without the escape, a POSIX ed would attempt to read the output of
     26  1.2  cgd the shell command `file'.  If the ed being tested does not support escape
     27  1.2  cgd processing on file names, then the script `mkscripts.sh' should be modified
     28  1.2  cgd accordingly.
     29  1.1  cgd 
     30  1.2  cgd The POSIX requirement that an address range not be used where at most
     31  1.2  cgd a single address is expected has been relaxed in this version of ed.
     32  1.2  cgd Therefore, the  following scripts  which test for compliance with this
     33  1.2  cgd POSIX rule exit abnormally:
     34  1.2  cgd =-err.ed
     35  1.2  cgd a1-err.ed
     36  1.2  cgd i1-err.ed
     37  1.2  cgd k1-err.ed
     38  1.2  cgd r1-err.ed
     39  1.3  alm 
     40  1.3  alm In addition, one of !1-err.ed or !2.ed will fail, depending on whether or
     41  1.3  alm not ed was compiled with the VI_BANG directive.
     42