I wrote:

> In patch 8.1.1161 I added a test that uses all the ANSI colors in a
> terminal window.  I checked locally that all the cases of the switch in
> color2index() are used.  However, in codecov.io only some of them are
> reported as covered:
> https://codecov.io/gh/vim/vim/src/master/src/terminal.c#L2436
> 
> Thinking that this may be a problem of running two Vim instances at the
> same time, and the coverage information of one overwrites the other, I
> changed the coverage of the nested Vim to be written in another
> directory.  That is in patch 8.1.1162, the nested Vim writes the
> coverage info in src/testdir/nested.  That worked, but the codecov tool
> doesn't pick up these files.  You can see coverage goes down a bit:
> https://codecov.io/gh/vim/vim/commits
> 
> So in patch 8.1.1163 I changed the Travis config to run codecov twice,
> and the second time move the coverage info from src/testdir/nested to
> src/objects, where it is found.  That brought the coverage back to what
> it was before 8.1.1162.  It also didn't increase, so perhaps having two
> Vim instances run at the same time is not a problem for coverage info?
> 
> Anyway, after all this the case statements are still not reported as
> covered.  Does anyone have an idea why?  You can create a pull request
> to try out some things.

I figured it out: When running locally the screen is redrawn.  When
running the test only the screen in the nested Vim is redrawn.  The Vim
in which the terminal window is running creates the screendump from the
internal terminal buffer.  It does not actually update the screen.  A
"redraw" just before making the screendump fixes this.

For debugging I used a ch_logfile() call in the test script and a few
ch_log() statements in the code.  That avoids race conditions.

Now I wonder why Brown and Darkgrey are not covered...

-- 
GALAHAD:   Camelot ...
LAUNCELOT: Camelot ...
GAWAIN:    It's only a model.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui