Can something like Script be done in System V?

Guy Harris guy at sun.uucp
Wed Jun 26 19:20:36 AEST 1985


> > there's not
> > much point in running "vi" with its input coming from a program generating
> > commands or from a file consisting of commands generated by a program.  
> > 	Guy Harris
> 
> One point in running any program whose quality is to be assured,
> including screen-oriented editors, with its input coming from a file is
> in automating the testing process.  A screen-oriented language-directed
> editor in whose development I participated could not have been tested
> in a timely way without using this technique.

However, there may be some aspects of its behavior that can't be tested by
running it from a file.  (An example - an editor which can offload some of
the low-level character processing to a smart terminal.  Your front end
tester will have to emulate the smart terminal - and even that may not be
enough, if you're also trying to debug the terminal's behavior.)

Also, that won't test its terminal mode setting/getting behavior (if it's a
screen editor, it sets the terminal mode to something other than the
default).

If you want to *really* test that, or if you want to get a transcript of a
session, something like "script" is the best choice - it eliminates one
variable from the testing procedure (the program's input is at least coming
from something it thinks is a terminal).

Besides, these are all special cases.  The point still remains that
designing a screen editor so that it runs "just as well" with its input
redirected to a pipe or file doesn't serve much purpose; if you want an
editor that talks to programs or files, write an editor intended to be
talked to by computer programs, not people.  People are good at things that
computers are very bad at and *vice versa*, so the quality of the user
interface of an interactive tool should *not* be sacrificed in the name of
"making it work with its input redirected".

	Guy Harris



More information about the Comp.unix mailing list