-
-
Couldn't load subscription status.
- Fork 5.9k
tests: use v:progpath instead of GetVimProg #4806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
TODO: - [ ] do not write it to vimcmd in the first place Ref: vim@da65058#r34658132
Codecov Report
@@ Coverage Diff @@
## master #4806 +/- ##
==========================================
+ Coverage 81.55% 81.55% +<.01%
==========================================
Files 118 118
Lines 145681 145681
==========================================
+ Hits 118804 118807 +3
+ Misses 26877 26874 -3
Continue to review full report at Codecov.
|
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
|
This is not going to work, because on some systems v:progpath is just "vim". I tried on Mac OS. |
|
Daniel Hahler wrote:
`v:progpath` was mentioned to not work in
#2186, but then crossed out.
No idea why it was crossed out, it can reproduce it with the current
version of Vim (on MacOS).
…--
The real
trick is
this: to
keep the
lines as
short as
possible
and keep
the size
the same
yet free
from the
need for
hyphena-
Dammit!! (Matthew Winn)
/// 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 ///
|
According to #2186 (comment) it is relative / just "vim" when not starting it with an absolute path? From da65058#r34664494:
So in the case of sourcing a test it would fall back to '../vim' then (because there is no How do you "source a test*.vim file" exactly? (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)
Yes, I've not meant to remove the file completely. |
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
|
For reference: |
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
|
Daniel Hahler wrote:
> 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.
The docs may be a bit confusing. It mentions "including the path", but
that means it includes the path if it was given. The help also says to
use "exepath()" to get the full path, but on Linux a special trick is
used to get the actual path of the executable, which ends up to always
be a full path. While on Mac you only get the full path if Vim was
started with a path, not when just typing "vim".
I'll add some more explanation to the help.
…--
Q: What is a patch 22?
A: A patch you need to include to make it possible to include patches.
/// 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 ///
|
|
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 can't complain, but sometimes I still do." (Joe Walsh)
/// 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 ///
|
I think having a method ( So for this it would be better to not use |
|
Daniel Hahler wrote:
>> 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)).
OK, let me do that and see what we end up with. We can at least drop
some "-u NONE" and "--clean" arguments.
…--
"I simultaneously try to keep my head in the clouds and my feet on the
ground. Sometimes it's a stretch, though." -- Larry Wall
/// 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 ///
|
Problem: Inconsistently using GetVimCommand() and v:progpath. (Daniel
Hahler)
Solution: Use GetVimCommand(). (closes #4806)
Problem: Inconsistently using GetVimCommand() and v:progpath. (Daniel
Hahler)
Solution: Use GetVimCommand(). (closes vim#4806)
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`.
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`.
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`.
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`.
TODO:
Ref: da65058#r34658132