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