> > Instead of manual testing, it would be useful to have the tests in
> > src/testdir. Vim is getting more and more complex, it's good to test
> > every feature.
>
> Thank you for the reply. I can add test script but I don't know how to make
> test script for Vim source code.
There are no direct tests for source code (you meant unit tests?). Functional
tests are located at src/testdir (where Bram already pointed you).
“gettabvar()” is already tested in src/testdir/test62.in so it makes sense to
put the test for it there. Grep failed to locate all of the other functions in
src/testdir so testing for new functionality needs to be combined with testing
for old one. No advice for placing, ask Bram or read other tests to find what
suits best, maybe the new one.
You probably don’t need to know how exactly that .in file is called (I
constantly forget it), but here is the exact command-line on unix (working
directory = src/testdir):
../vim -u unix.vim -U NONE --noplugin -s dotest.in test87.in
. Output is then placed to test.out (Makefile moves it to test87.out
afterwards). If you are sure new test works fine just replace old test62.ok
with test62.out (make) / test.out (manual launch). Test is considered
successful if test.out is identical to test87.ok, that’s all. How exactly
test.out is written is determined by the test itself, for disabled features,
for example, tests just copy *.ok file to test.out.
Though all I ever did is just taking an existing test file and modifying it or
copying, purging actual tests keeping some test.out-writing code and then
adding new ones. You don’t need to “know” anything, just do like somebody did
before.
--
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