Added more tests...

This commit is contained in:
alm 1993-05-27 01:28:27 +00:00
parent f7f6e6ffd5
commit a723dd79c7
10 changed files with 44 additions and 1 deletions

View File

@ -1,7 +1,16 @@
The files in this directory with suffixes `.t', `.d', `.r' and `.err' are
used for testing ed. To run the tests, set the ED variable in the Makefile
for the path name of the program to be tested (e.g., /bin/ed), and type
`make'. The tests do not exhaustively verify POSIX compliance.
`make'. The tests do not exhaustively verify POSIX compliance nor do
they verify correct 8-bit or long line support.
The test file suffixes have the following meanings:
.t Template - a list of ed commands from which an ed script is
constructed
.d Data - read by an ed script
.r Result - the expected output after processing data via an ed
script.
.err Error - invalid ed commands that should generate an error
The output of the tests is written to the two files err.o and scripts.o.
At the end of the tests, these files are grep'ed for error messages,

13
bin/ed/test/TODO Normal file
View File

@ -0,0 +1,13 @@
Some missing tests:
0) g/./s^@^@ - okay: NULs in commands
1) g/./s/^@/ - okay: NULs in patterns
2) a
hello^V^Jworld
. - okay: embedded newlines in insert mode
3) ed "" - error: invalid filename
4) red .. - error: restricted
5) red / - error: restricted
5) red !xx - error: restricted
6) ed -x - verify: 8-bit clean
7) ed - verify: long-line support
8) ed - verify: interactive/help mode

1
bin/ed/test/addr1.err Normal file
View File

@ -0,0 +1 @@
100

1
bin/ed/test/addr2.err Normal file
View File

@ -0,0 +1 @@
-100

4
bin/ed/test/s10.err Normal file
View File

@ -0,0 +1,4 @@
a
hello
.
s/[h[.]/x/

0
bin/ed/test/s3.d Normal file
View File

1
bin/ed/test/s3.r Normal file
View File

@ -0,0 +1 @@
hello world

6
bin/ed/test/s3.t Normal file
View File

@ -0,0 +1,6 @@
a
hello/[]world
.
s/[/]/ /
s/[[:digit:][]/ /
s/[]]/ /

4
bin/ed/test/s8.err Normal file
View File

@ -0,0 +1,4 @@
a
hello
.
s/[h[=]/x/

4
bin/ed/test/s9.err Normal file
View File

@ -0,0 +1,4 @@
a
hello
.
s/[h[:]/x/