summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDrew Olson <drew@drewolson.org>2019-06-17 06:54:43 -0500
committerw0rp <w0rp@users.noreply.github.com>2019-06-17 12:54:43 +0100
commit1c71da5624fc46107cda4852add08fe34385dfd9 (patch)
tree4dc0c856be3798f7bfe1539fb33a2bea5496fca7 /test
parent701c1e4f170a665ec2873a828297bb0afad6719b (diff)
downloadale-1c71da5624fc46107cda4852add08fe34385dfd9.zip
Add support for purescript language server (#2572)
* Add support for purescript language server * Update naming * Add purescript language server tests
Diffstat (limited to 'test')
-rw-r--r--test/command_callback/purescript_paths/bower/Foo.purs0
-rw-r--r--test/command_callback/purescript_paths/bower/bower.json0
-rw-r--r--test/command_callback/purescript_paths/psc-package/Foo.purs0
-rw-r--r--test/command_callback/purescript_paths/psc-package/psc-package.json0
-rw-r--r--test/command_callback/purescript_paths/spago/Foo.purs0
-rw-r--r--test/command_callback/purescript_paths/spago/spago.dhall0
-rw-r--r--test/command_callback/test_purescript_ls_command_callbacks.vader31
7 files changed, 31 insertions, 0 deletions
diff --git a/test/command_callback/purescript_paths/bower/Foo.purs b/test/command_callback/purescript_paths/bower/Foo.purs
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/command_callback/purescript_paths/bower/Foo.purs
diff --git a/test/command_callback/purescript_paths/bower/bower.json b/test/command_callback/purescript_paths/bower/bower.json
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/command_callback/purescript_paths/bower/bower.json
diff --git a/test/command_callback/purescript_paths/psc-package/Foo.purs b/test/command_callback/purescript_paths/psc-package/Foo.purs
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/command_callback/purescript_paths/psc-package/Foo.purs
diff --git a/test/command_callback/purescript_paths/psc-package/psc-package.json b/test/command_callback/purescript_paths/psc-package/psc-package.json
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/command_callback/purescript_paths/psc-package/psc-package.json
diff --git a/test/command_callback/purescript_paths/spago/Foo.purs b/test/command_callback/purescript_paths/spago/Foo.purs
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/command_callback/purescript_paths/spago/Foo.purs
diff --git a/test/command_callback/purescript_paths/spago/spago.dhall b/test/command_callback/purescript_paths/spago/spago.dhall
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/command_callback/purescript_paths/spago/spago.dhall
diff --git a/test/command_callback/test_purescript_ls_command_callbacks.vader b/test/command_callback/test_purescript_ls_command_callbacks.vader
new file mode 100644
index 00000000..da63f7f1
--- /dev/null
+++ b/test/command_callback/test_purescript_ls_command_callbacks.vader
@@ -0,0 +1,31 @@
+Before:
+ call ale#assert#SetUpLinterTest('purescript', 'ls')
+
+After:
+ call ale#assert#TearDownLinterTest()
+
+Execute(should set correct defaults):
+ AssertLinter 'purescript-language-server', ale#Escape('purescript-language-server') . ' --stdio'
+
+Execute(should set correct LSP values):
+ call ale#test#SetFilename('purescript_paths/spago/Foo.purs')
+
+ AssertLSPLanguage 'purescript'
+ AssertLSPOptions {}
+ AssertLSPConfig {}
+ AssertLSPProject ale#path#Simplify(g:dir . '/purescript_paths/spago')
+
+Execute(should set correct project for bower):
+ call ale#test#SetFilename('purescript_paths/bower/Foo.purs')
+
+ AssertLSPProject ale#path#Simplify(g:dir . '/purescript_paths/bower')
+
+Execute(should set correct project for psc-package):
+ call ale#test#SetFilename('purescript_paths/psc-package/Foo.purs')
+
+ AssertLSPProject ale#path#Simplify(g:dir . '/purescript_paths/psc-package')
+
+Execute(should accept configuration settings):
+ AssertLSPConfig {}
+ let b:ale_purescript_ls_config = {'purescript': {'addSpagoSources': v:true}}
+ AssertLSPConfig {'purescript': {'addSpagoSources': v:true}}