Replies: 16 comments 22 replies
-
So, I've put together this prototype. @chrisbra, would care to have a look at it? |
Beta Was this translation helpful? Give feedback.
-
Thanks, @zzzyxwvut. Sorry, I don't always seem to get notifications so I missed this one. There is already a comment-based mechanism for test setup in the indent test runner. That could probably be reused here as well. |
Beta Was this translation helpful? Give feedback.
-
All right, here is an alternative prototype based on vim/runtime/indent/testdir/runtest.vim Lines 64 to 68 in 5131f22 Some observation regarding the newer prototype, so far. Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
I was thinking the It looks like about 90% of the current syntax filetypes allow comments. Most of those that don't are very simple and will ignore the config lines, however, there will always be exceptions that probably also require the most testing. Why not offer both methods?
I don't understand this comment. Could you elaborate? Thanks for working on this. |
Beta Was this translation helpful? Give feedback.
-
As the second prototype currently implemented, there will be Here, is the marriage of two prototypes (with documentation |
Beta Was this translation helpful? Give feedback.
-
Is there a reason not to start with |
Beta Was this translation helpful? Give feedback.
-
I doubt it. Let's postpone the sourcing of |
Beta Was this translation helpful? Give feedback.
-
A commentless Markdown test file can now be processed with |
Beta Was this translation helpful? Give feedback.
-
Now that the benefit of offering a support for embeddable There are no matches of |
Beta Was this translation helpful? Give feedback.
-
Okay. The commit that introduces the hybrid support has been |
Beta Was this translation helpful? Give feedback.
-
Another round of changes has been pushed. |
Beta Was this translation helpful? Give feedback.
-
Is |
Beta Was this translation helpful? Give feedback.
-
With So far the list is: " BEGIN [runtime/defaults.vim]
set display=truncate ruler scrolloff=5
" Provide pre-TEST_SETUP support for input/c.c.
let g:c_comment_strings = 1
syntax on
" END [runtime/defaults.vim] I'm not sure about Note that we get It's weird, but the This legacy script alternative is ignored: let c_comment_strings = 1 But whether ../../src/vim --clean (The Ex commands replicate how :split | vsplit | set t_Co=256 background=light | hi Normal ctermfg=NONE ctermbg=NONE
:let g:vim_id = term_start('vim -f --clean --gui-dialog-file guidialogfile --cmd "set enc=utf8" -v --cmd "set t_u7=" -Nu NONE', {'term_cols': 75, 'curwin': 1, 'term_rows': 20, 'term_name': printf('[PPID:%d]', getpid())})
:edit testdir/input/c.c
:set display=truncate ruler scrolloff=5
:let c_comment_strings = 1
:syntax on |
Beta Was this translation helpful? Give feedback.
-
The WIP changes are up. There was another :syntax on at the top of Xtestscript!! Is there a need to protect introduced line continuations |
Beta Was this translation helpful? Give feedback.
-
The final WIP changes are up. If all is well, I can draft a PR tomorrow. |
Beta Was this translation helpful? Give feedback.
-
To follow up our discussion regarding whether to prefer non- For convenience, these are current
I think this is a use case for potential With other teardown applications that come to mind:
If these shell-related assertions can be rewritten, The current vim/runtime/syntax/testdir/runtest.vim Lines 204 to 207 in 70e566b Shouldn't the call term_sendkeys(buf, ":redraw!\<CR>") ? As for |
Beta Was this translation helpful? Give feedback.
-
Grepping for
exists(
inruntime/syntax
and looking atthe matched results reveals that it is common to have some
conditional recognition functionality for parts of syntax:
According to
runtime/syntax/Makefile
, Vim is launched withthe
--clean
flag (and soruntime/defaults.vim
is used forvimrc
). Currently, it seems, the very same syntax file isthe only place where a syntax file maintainer or contributor
can define global variables (and remove them when needed),
so that the file parts guarded with such variables can be
read during screen dump generation. This approach may lead
to littering the syntax file with test-related queries that
tentatively compare the current buffer name and a filename
from
runtime/syntax/testdir/input
, look for any clues inthe current working directory, etc.
Can we do better?
Beta Was this translation helpful? Give feedback.
All reactions