Added more tests...
This commit is contained in:
parent
f7f6e6ffd5
commit
a723dd79c7
|
@ -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,
|
||||
|
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
100
|
|
@ -0,0 +1 @@
|
|||
-100
|
|
@ -0,0 +1,4 @@
|
|||
a
|
||||
hello
|
||||
.
|
||||
s/[h[.]/x/
|
|
@ -0,0 +1 @@
|
|||
hello world
|
|
@ -0,0 +1,6 @@
|
|||
a
|
||||
hello/[]world
|
||||
.
|
||||
s/[/]/ /
|
||||
s/[[:digit:][]/ /
|
||||
s/[]]/ /
|
|
@ -0,0 +1,4 @@
|
|||
a
|
||||
hello
|
||||
.
|
||||
s/[h[=]/x/
|
|
@ -0,0 +1,4 @@
|
|||
a
|
||||
hello
|
||||
.
|
||||
s/[h[:]/x/
|
Loading…
Reference in New Issue