fennel-ls/test/init.fnl
Michele Campeotto e504013663 Update unnecessary tset lint to handle any key nesting depth.
The unnecessary tset lint was assuming a single key, but it was
triggering for calls with multiple nested keys, causing the quickfix
action to drop all elements after the fourth argument, which was assumed
to be the value.

Now it's been updated to handle nested calls of any depth.
2025-03-22 12:03:57 -07:00

31 lines
895 B
Fennel

(local faith (require :faith))
(local fennel (require :fennel))
(set debug.getinfo (or fennel.getinfo debug.getinfo))
(set debug.traceback (or fennel.traceback debug.traceback))
(case (string.match (or (os.getenv "FAITH_TEST") "")
"([^ ]+) ?([^ ]*)")
(module "") (faith.run [module])
(module function) (do
(tset package.loaded module
{function (. (require module) function)})
(faith.run [module]))
_ (faith.run
[:test.json-rpc
:test.string-processing
:test.capabilities
:test.settings
:test.diagnostic
:test.goto-definition
:test.hover
:test.completion
:test.references
:test.document-highlight
:test.signature-help
:test.lint
:test.code-action
:test.rename
:test.misc
:test.check]))