summaryrefslogtreecommitdiff
path: root/test/linter/test_swift_sourcekitlsp.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/linter/test_swift_sourcekitlsp.vader')
-rw-r--r--test/linter/test_swift_sourcekitlsp.vader21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/linter/test_swift_sourcekitlsp.vader b/test/linter/test_swift_sourcekitlsp.vader
new file mode 100644
index 00000000..1040d590
--- /dev/null
+++ b/test/linter/test_swift_sourcekitlsp.vader
@@ -0,0 +1,21 @@
+Before:
+ call ale#assert#SetUpLinterTest('swift', 'sourcekitlsp')
+
+After:
+ call ale#assert#TearDownLinterTest()
+
+Execute(The default executable path should be correct):
+ call ale#test#SetFilename('../test-files/swift/swift-package-project/src/folder/dummy.swift')
+
+ AssertLinter 'sourcekit-lsp', ale#Escape('sourcekit-lsp')
+
+Execute(Should let users configure a global executable and override local paths):
+ call ale#test#SetFilename('../test-files/swift/swift-package-project/src/folder/dummy.swift')
+
+ let g:ale_sourcekit_lsp_executable = '/path/to/custom/sourcekitlsp'
+
+ AssertLinter '/path/to/custom/sourcekitlsp',
+ \ ale#Escape('/path/to/custom/sourcekitlsp')
+
+Execute(The language should be correct):
+ AssertLSPLanguage 'swift'