On Thu, Jul 29, 2010 at 10:49 PM, Marc Weber <[email protected]> wrote:
>> Is anyone aware of anything like a terminal-emulator version of
>> Selenium?
What if we had some helper command that dumps how the
current screen look like so that it can be compared with
some "expected_dump.txt"?
Something along the lines of:
FILE *fd = fopen("dump.txt", "w");
int r, c;
for (r = 0; r < screen_Rows; r++)
for (c = 0; c < screen_Columns; c++)
fputc(ScreenLines[r * screen_Columns + c], fd);
fputc('\n', fd);
fclose(fd);
I think this would help in testing stuff that would not be
easy to test currently like 'relativenumber', and
completion-related stuff.
Vim can then be told to dump the screen to a file by setting
up hooks, say, "dump the screen whenever this or that event
happen", or maybe done through the "--remote-send/expr" or
by sending signals.
This implies that the test must be done in a pre-set terminal
size.
The file "expected_dump.txt" would of course be prepared
through the same facility.
I think the BOE (benefit-to-effort, as in signal-to-noise) ratio
would be quite high.
Worth a shot?
Hmm or we can just make use of the hardcopy feature in screen
(the terminal multiplexer)?
nazri.
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php