Files
deb-lite-xl/debian/extra/plugins/editorconfig/runtest.lua
T
vhaudiquet 56ef7344f0 Vendor selectionhighlight, bracketmatch, colorpreview, navigate, editorconfig (2.1.8-7)
Five more plugins from lite-xl-plugins @ 31eef29, all default VSCode
behaviors:

- selectionhighlight: highlights other occurrences of the selected word
- bracketmatch: highlights the bracket matching the one under the cursor
- colorpreview: inline swatches for #hex/rgb()/hsl() color literals
- navigate: Go Back / Go Forward cursor history (alt+left/right)
- editorconfig: applies .editorconfig files; vendored as the whole
  upstream directory (parser + test harness, lite-xl test editorconfig);
  builds on the bundled trimwhitespace plugin

All depend on core only (editorconfig additionally on trimwhitespace,
already shipped). Verified against the built package: all plugins load,
navigate registers its commands, and an .editorconfig with
indent_size = 2 is applied to an opened file.

Pinned to lite-xl-plugins @ 31eef29 (see debian/extra/README.source).
2026-09-17 11:18:20 +02:00

64 lines
2.5 KiB
Lua

local core = require "core"
local tests = require "plugins.editorconfig.tests"
-- disable print buffer for immediate output
io.stdout:setvbuf "no"
-- overwrite to print into stdout
function core.error(format, ...)
print(string.format(format, ...))
end
function core.log(format, ...)
print(string.format(format, ...))
end
function core.log_quiet(format, ...)
print(string.format(format, ...))
end
-- check if --parsers flag was given to only output the path expressions and
-- their conversion into regular expressions.
local PARSERS = false
for _, argument in ipairs(ARGS) do
if argument == "--parsers" then
PARSERS = true
end
end
if not PARSERS then
require "plugins.editorconfig.tests.glob"
require "plugins.editorconfig.tests.parser"
require "plugins.editorconfig.tests.properties"
tests.run()
else
-- Globs
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/glob/braces.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/glob/brackets.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/glob/question.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/glob/star.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/glob/star_star.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/glob/utf8char.in")
-- Parser
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/parser/basic.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/parser/bom.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/parser/comments.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/parser/comments_and_newlines.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/parser/comments_only.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/parser/crlf.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/parser/empty.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/parser/limits.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/parser/newlines_only.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/parser/whitespace.in")
-- Properties
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/properties/indent_size_default.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/properties/lowercase_names.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/properties/lowercase_values.in")
tests.add_parser(USERDIR .. "/plugins/editorconfig/tests/properties/tab_width_default.in")
tests.run_parsers()
end