You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vim9script
Describe d
Context c
It should pass
Assert Equals(3, 1+2)
End
End
End
Then run ./bin/themis test.vimspec.
$ ./bin/themis test.vimspec
Bail out! Error occurred in script loading.
# function themis/Runner.load_scripts(files_with_styles, target_bundle) abort dict Line:11 [ Absolute Line: 130 ] (~/vimfiles/pack/cui/start/vim-them
is/autoload/themis/runner.vim)
# function themis/style['vimspec'].load_script(filename, runner) abort dict Line:5 [ Absolute Line: 298 ] (~/vimfiles/pack/cui/start/vim-themis/autol
oad/themis/style/vimspec.vim)
# function script() This function is already deleted.
# 1:
# Vim(vim9script):E1039: "vim9script" must be the first command in a script
Digging a bit deeper, my original assumption seems right. Turns out the translation assumes legacy vimscript. If you look at the style/vimspec.vim, you'd realize that the parse_<> functions — s:parse_describe, s:parse_hooks:parse_example and s:parse_end — all assume translations into legacy vimscript.
One solution here is to define a vim9script strategy which could auto-detect on the vim9script keyword and parse accordingly.
Describe the bug
Vimspec style tests fail in vim9 script.
How to reproduce the problem from Vim startup
Create
test.vimspec
as follows:Then run
./bin/themis test.vimspec
.On the other hand, basic style tests don't fail.
Expected behavior
I expect vimspec style tests don't fail in vim9 script as well as basic style tests.
Actual behavior
See above.
Your environment
The text was updated successfully, but these errors were encountered: