1
0
forked from aniani/vim

13 Commits

Author SHA1 Message Date
Aliaksei Budavei
6852e5c597
runtime(syntax-tests): Re-introduce support for "phoney" languages
As of patch v9.1.1176~1, there are no longer makeshift Make
targets to accommodate language names that can match phoney
targets.  For example, "clean_" was previously generated for
Clean because otherwise it clashed with the "clean" target.

Additionally, enable test filtering for makeshift targets.

Reference:
https://wiki.clean.cs.ru.nl/Clean

closes: #16810

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-07 19:12:45 +01:00
Eisuke Kawashima
2e18facede
test(runtime/syntax): improve syntax tests
When a syntax file is changed, timestamps of the corresponding files are
updated.

NOTE: At the moment this script does not strictly track dependency, like
cpp on c.

Also update ignore files

closes #16548

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 21:15:45 +01:00
Aliaksei Budavei
7003a5d63f
runtime(syntax-tests): Apply stronger synchronisation between buffers
The current lightweight synchronisation with ":redraw" needs further
reinforcement in the light of v9.1.1110.  And, with v9.1.0820, make
another synchronisation point _before_ the first (or only) screenful is
dumped.

Also add a script to regenerate all screendumps.

closes: #16632

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-01 16:28:20 +01:00
Yee Cheng Chin
5881828104
ci: syntax tests spam output
Currently syntax tests outputs all the Vim commands to the console,
which is annoying for a local developer but also makes the CI output
impossible to parse and just printing all the terminal output comes with
a performance penalty.

So let's just simply redirect all output to /dev/null similar to what
the script tests do.

This can be turned off locally for someone diagnosing issues but it
should not be the default behavior to output all terminal control
sequences to output in CI.

closes: #16612

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 20:16:11 +01:00
Aliaksei Budavei
ec0229414b
patch 9.1.0763: tests: cannot run single syntax tests
Problem:  tests: cannot run single syntax tests
Solution: Support running a subset of syntax tests
          (Aliaksei Budavei)

Two methods of assembling a subset of test filenames for
selection are provided:

* Filename and filetype Make targets will be generated, and
  multiple such targets can be passed before the mandated
  trailing "test" target, e.g. "make html markdown test".

* Filenames and their parts can be specified as a regular
  expression that is assigned to a "VIM_SYNTAX_TEST_FILTER"
  environment variable, and used with the test Make target,
  e.g. "VIM_SYNTAX_TEST_FILTER=html\\\|markdown make test".
  (This variable will be ignored and the whole suite will be
  run when Make is GNU Make and a parent Makefile is used.)

Methods can be used alone or together, with the Make targets
having the higher precedence. Neither method will influence
the order of test execution.

closes: #15670

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 16:57:33 +02:00
Christian Brabandt
56824430c0
runtime(syntax-tests): simplify code and allow filetype options
The whole testdir/runtest.vim is a bit of a mess. So this is an attempt
to improving the current state. First of all, let's move most of the
code into a single RunTest() function so that it's easier to run this
manually.

Then, let's add the possibility to customize filetype specific tests by
applying filetype specific options. We will make use of it in the next
commit, where the provided java file uses tabs, which cause line
wrapping which will then cause the scrolling to miss some lines when
redrawing (see #14105)

related: #14105

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-28 21:24:25 +01:00
Christian Brabandt
627c950e5b
patch 9.1.0091: Syntax test fails when run with non C locale
Problem:  Syntax test fails when run with non C locale
Solution: Run syntax tests with C locale, clean up Xtestscript file,
          strip environment variables from GetVimCommand()
          (h-east)

closes: #14007

Co-authored-by: h-east <h.east.727@gmail.com>
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-10 13:02:17 +01:00
Dominique Pellé
99c3849a92
patch 9.0.1929: runtime tests fail with tiny vim
Problem:  runtime tests fail with tiny vim
Solution: check for tiny vim, run runtime tests in CI
          even for tiny version

closes: #13169
closes: #13170

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
2023-09-24 16:09:31 +02:00
Bram Moolenaar
10c1dbc06a patch 9.0.1651: unclear why syntax test fails on Mac
Problem:    Unclear why syntax test fails on Mac.
Solution:   Temporarily show the whole "messages" file.
2023-06-23 19:37:19 +01:00
Bram Moolenaar
031d632188 patch 9.0.1648: result of syntax tests is hard to see
Problem:    Result of syntax tests is hard to see.
Solution:   List the failed tests.
2023-06-22 22:38:54 +01:00
Bram Moolenaar
1aa5f1c21f patch 9.0.1647: insufficient testing for syntax plugins
Problem:    Insufficient testing for syntax plugins.
Solution:   Add shell file examples. (Charles Campbell)  Create a messages
            file for easier debugging and reporting the test results.
2023-06-22 21:57:51 +01:00
K.Takata
d5b952a871 patch 9.0.1628: syntax tests fail on FreeBSD
Problem:    Syntax tests fail on FreeBSD.
Solution:   Pass the Vim executable path with VIMPROG. (Ken Takata,
            closes #12535)  Adjust the paths.
2023-06-13 22:44:57 +01:00
Bram Moolenaar
46acad7284 patch 9.0.1627: no generic mechanism to test syntax plugins
Problem:    No generic mechanism to test syntax plugins.
Solution:   Add a syntax plugin test mechanism, using screendumps.  Add a
            simple test for "c".
2023-06-11 19:04:18 +01:00