xref: /freebsd/bin/ed/test/README (revision 8aac90f18aef7c9eea906c3ff9a001ca7b94f375)
1
2The files in this directory with suffixes `.t', `.d', `.r' and `.err' are
3used for testing ed.  To run the tests, set the ED variable in the Makefile
4for the path name of the program to be tested (e.g., /bin/ed), and type
5`make'.  The tests do not exhaustively verify POSIX compliance nor do
6they verify correct 8-bit or long line support.
7
8The test file suffixes have the following meanings:
9.t    Template - a list of ed commands from which an ed script is
10      constructed
11.d    Data - read by an ed script
12.r    Result - the expected output after processing data via an ed
13      script.
14.err  Error - invalid ed commands that should generate an error
15
16The output of the tests is written to the two files err.o and scripts.o.
17At the end of the tests, these files are grep'ed for error messages,
18which look like:
19	*** The script u.ed exited abnormally ***
20or:
21	*** Output u.o of script u.ed is incorrect ***
22
23The POSIX requirement that an address range not be used where at most
24a single address is expected has been relaxed in this version of ed.
25Therefore, the  following scripts  which test for compliance with this
26POSIX rule exit abnormally:
27=-err.ed
28a1-err.ed
29i1-err.ed
30k1-err.ed
31r1-err.ed
32