[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: atf for libcurses
On Fri, 05 Nov 2010, Brett Lymn wrote:
> > There are in general multiple character or command sequences that
> > generate the same output.
> Yes that is true but we are talking about driving the curses library,
> this should be deterministic, given a terminal type a certain sequence
> of calls should result in a certain sequence of output.
It's deterministic given your constraints and also given a particular
implementation or curses, but it can legitmately change when the curses
For example, if some line somewhere on the screen contains the text
"abcde", and the cursor is on the "b". and you want to move the cursor
to the "d", then any one of these would be acceptable:
cup(x,y) -- move to absolute position of the "e" character
"bc" -- overwrite all chars between old and new position
cuf1; cuf1 -- move right two positions
TAB -- if you are lucky and the "d" is on a tabstop
If the test expects cuf1;cuf1, and later somebody improves the curses
library to emit "bc" or TAB instead, then the test would fail, but the
actual change to the code would be an improvement, not a bug.
I think everybody understands this, but some people draw the conclusion
"therefore the tests should not be at this abstraction level", and other
people draw the conclusion "therefore we will have to deal with updating
the tests as the code changes".
--apb (Alan Barrett)
Main Index |
Thread Index |