Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@blueyed
Copy link

@blueyed blueyed commented Aug 12, 2019

TODO:

  • do not write it to vimcmd in the first place

Ref: da65058#r34658132

TODO:

- [ ] do not write it to vimcmd in the first place

Ref: vim@da65058#r34658132
@codecov-io
Copy link

Codecov Report

Merging #4806 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4806      +/-   ##
==========================================
+ Coverage   81.55%   81.55%   +<.01%     
==========================================
  Files         118      118              
  Lines      145681   145681              
==========================================
+ Hits       118804   118807       +3     
+ Misses      26877    26874       -3
Impacted Files Coverage Δ
src/gui_beval.c 62.5% <0%> (-0.87%) ⬇️
src/if_xcmdsrv.c 85.63% <0%> (-0.54%) ⬇️
src/gui.c 63.65% <0%> (-0.06%) ⬇️
src/os_unix.c 63.29% <0%> (-0.05%) ⬇️
src/window.c 87.76% <0%> (-0.04%) ⬇️
src/terminal.c 81.34% <0%> (+0.03%) ⬆️
src/viminfo.c 75.64% <0%> (+0.52%) ⬆️
src/profiler.c 93.25% <0%> (+0.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d5e3cc1...e3431b9. Read the comment docs.

@blueyed
Copy link
Author

blueyed commented Aug 12, 2019

v:progpath was mentioned to not work in #2186, but then crossed out.

/cc @ichizok

blueyed added a commit to blueyed/neovim that referenced this pull request Aug 12, 2019
Problem:    Test_popup_and_window_resize() does not always pass.
Solution:   Do not use $VIMPROG, pass the Vim executable in the vimcmd file.
            (Ozaki Kiichi, closes vim/vim#2186)
vim/vim@6318205

NOTE: Does not add `GetVimProg()`, but keeps/syncs existing usages of it
in tests (which obviously are all skipped, mostly because of
`!has('terminal')`).  Likely to be replaced with `v:progpath` in Vim [1], or
at least that would/should be used with Neovim then probably.

1: vim/vim#4806
@brammool
Copy link
Contributor

This is not going to work, because on some systems v:progpath is just "vim". I tried on Mac OS.

@brammool brammool closed this Aug 12, 2019
@brammool
Copy link
Contributor

brammool commented Aug 12, 2019 via email

@blueyed
Copy link
Author

blueyed commented Aug 13, 2019

v:progpath

According to #2186 (comment) it is relative / just "vim" when not starting it with an absolute path?
According to the help this sounds like a bug, since it should be absolute always.

From da65058#r34664494:

$VIMPROG may be different from v:progpath, depending on what test you are running and how. I sometimes source a test*.vim file and expect the vim command executed in the terminal be the one that was most recently build, not the one I'm currently running.

So in the case of sourcing a test it would fall back to '../vim' then (because there is no vimcmd), no? (and the Makefile would also write '../vim' there).

How do you "source a test*.vim file" exactly?
(It is required to be in src/testdir then already (for the relative "imports"), and tests are not run automatically when sourcing. Do you run the test function then manually?)

(Also it appears to make a difference only for a few tests, i.e. other tests would use the current Vim instance anyway - resulting in a mix of current/build Vim being used)

The vimcmd file has two lines, the stuff in the second line is not in v:progpath, thus we can't drop writing "vimcmd".

Yes, I've not meant to remove the file completely.

blueyed added a commit to blueyed/neovim that referenced this pull request Aug 13, 2019
Problem:    Test_popup_and_window_resize() does not always pass.
Solution:   Do not use $VIMPROG, pass the Vim executable in the vimcmd file.
            (Ozaki Kiichi, closes vim/vim#2186)
vim/vim@6318205

vim-patch:8.0.1526: no test using a screen dump yet

Problem:    No test using a screen dump yet.
Solution:   Add a test for C syntax highlighting.  Add helper functions.
vim/vim@da65058

NOTE: uses modified `GetVimProg()` (which is used with skipped tests only
(mostly because of `!has('terminal')`)).

Vim uses a 'vimcmd' file, while Nvim uses `$NVIM_TEST_ARGX` environment
variables.

Ref: vim/vim#4806
@blueyed
Copy link
Author

blueyed commented Aug 13, 2019

For reference: v:progpath is used already in other tests. According to the argument above it should use GetVimProg() then probably?

blueyed added a commit to blueyed/neovim that referenced this pull request Aug 13, 2019
Problem:    Test_popup_and_window_resize() does not always pass.
Solution:   Do not use $VIMPROG, pass the Vim executable in the vimcmd file.
            (Ozaki Kiichi, closes vim/vim#2186)
vim/vim@6318205

vim-patch:8.0.1526: no test using a screen dump yet

Problem:    No test using a screen dump yet.
Solution:   Add a test for C syntax highlighting.  Add helper functions.
vim/vim@da65058

NOTE: uses modified `GetVimProg()` (which is used with skipped tests only
(mostly because of `!has('terminal')`)).

Vim uses a 'vimcmd' file, while Nvim uses `$NVIM_TEST_ARGX` environment
variables.

Ref: vim/vim#4806
@brammool
Copy link
Contributor

brammool commented Aug 13, 2019 via email

@brammool
Copy link
Contributor

brammool commented Aug 13, 2019 via email

@blueyed
Copy link
Author

blueyed commented Aug 14, 2019

For reference: v:progpath is a used already in other tests. According to
the argument above it should use GetVimProg() then probably?

There are actually quite a lot of them. We defenitely want to avoid the
inconsistency. Since changing it either way will change the executable used
in corner cases, perhaps we should go for the simpler one and use v:progpath?

I think having a method (GetVimProg) allows for more flexibility, e.g. when
you want to prepend something always (e.g. "covimerage run --append" to get
coverage).
For this however it would need to return a list then, and would not really
reflect what the name implies then.

So for this it would be better to not use v:progpath/GetVimProg in tests,
but the already existing GetVimCommand() and GetVimCommandClean() functions
(which currently return a string - but could be changed to use a list (not
necessary, but cleaner)).

@brammool
Copy link
Contributor

brammool commented Aug 14, 2019 via email

brammool added a commit that referenced this pull request Aug 14, 2019
Problem:    Inconsistently using GetVimCommand() and v:progpath. (Daniel
            Hahler)
Solution:   Use GetVimCommand(). (closes #4806)
manuelschiller pushed a commit to manuelschiller/vim that referenced this pull request Nov 10, 2019
Problem:    Inconsistently using GetVimCommand() and v:progpath. (Daniel
            Hahler)
Solution:   Use GetVimCommand(). (closes vim#4806)
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Feb 14, 2022
Problem:    Inconsistently using GetVimCommand() and v:progpath. (Daniel
            Hahler)
Solution:   Use GetVimCommand(). (closes vim/vim#4806)
vim/vim@93344c2

Cherry-pick a change to test_profile.vim from patch 8.1.1544.
Cherry-pick a change to test_vimscript.vim from patch 8.1.1826.

Some of the args are no-op in Nvim, and `-i NONE` and `--headless` are
already added by `GetVimCommand()`. I'll try to match the order of args
in upstream, substituting `--not-a-term` with `--headless`.
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Feb 14, 2022
Problem:    Inconsistently using GetVimCommand() and v:progpath. (Daniel
            Hahler)
Solution:   Use GetVimCommand(). (closes vim/vim#4806)
vim/vim@93344c2

Cherry-pick a change to test_profile.vim from patch 8.1.1544.
Cherry-pick a change to test_vimscript.vim from patch 8.1.1826.

Some of the args are no-op in Nvim, and `-i NONE` and `--headless` are
already added by `GetVimCommand()`. I'll try to match the order of args
in upstream, substituting `--not-a-term` with `--headless`.
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Feb 14, 2022
Problem:    Inconsistently using GetVimCommand() and v:progpath. (Daniel
            Hahler)
Solution:   Use GetVimCommand(). (closes vim/vim#4806)
vim/vim@93344c2

Cherry-pick a change to test_profile.vim from patch 8.1.1544.
Cherry-pick a change to test_vimscript.vim from patch 8.1.1826.

Some of the args are no-op in Nvim, and `-i NONE` and `--headless` are
already added by `GetVimCommand()`. I'll try to match the order of args
in upstream, substituting `--not-a-term` with `--headless`.
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Feb 14, 2022
Problem:    Inconsistently using GetVimCommand() and v:progpath. (Daniel
            Hahler)
Solution:   Use GetVimCommand(). (closes vim/vim#4806)
vim/vim@93344c2

Cherry-pick a change to test_profile.vim from patch 8.1.1544.
Cherry-pick a change to test_vimscript.vim from patch 8.1.1826.

Some of the args are no-op in Nvim, and `-i NONE` and `--headless` are
already added by `GetVimCommand()`. I'll try to match the order of args
in upstream, substituting `--not-a-term` with `--headless`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants