Re: building a test case with netbeans
Xavier de Gaye <xdegaye <at> gmail.com>
2011-10-01 12:39:11 GMT
On Fri, Sep 30, 2011 at 4:12 PM, Bram Moolenaar wrote:
> Xavier de Gaye wrote:
>> ...
>> When building an automated test case with netbeans, it is not obvious
>> how to have Vim made to call the idle loop. The attached patch adds a
>> call to netbeans_parse_messages() when the Vim ":sleep" command is
>> run. This allows for a more deterministic way of writing the test
>> cases (instead of inserting ":sleep" commands randomly until it works,
>> on this hardware).
>
> OK, this makes sense. So you would run a Vim script that calls sleep in
> an endless loop?
Yes, this is right. It is a bit complicated due to the fact that there
are three processes running asynchronously (Vim, pyclewn and gdb), so
it is better to give an example. A typical pyclewn test case checks
that the content of a ${test_out} file contains the expected Vim signs
list:
* the test starts by running the sequence of Vim and pyclewn
commands that triggers gdb and sets breakpoint signs in Vim
buffers
* the test ends with the following commands:
:call Wait_eop()
:redir! > ${test_out}
:sign place
:qa
* the definition of Wait_eop() follows:
(Continue reading)