From f64f0bb48c6e080932ec3a99ac03a69a57f7a933 Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Fri, 7 Sep 2018 13:16:22 -0400 Subject: Added tests --- .../julia-languageserver-project/REQUIRE | 0 .../julia-languageserver-project/test.jl | 0 .../test_julia_languageserver_callbacks.vader | 20 ++++++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 test/command_callback/julia-languageserver-project/REQUIRE create mode 100644 test/command_callback/julia-languageserver-project/test.jl create mode 100644 test/command_callback/test_julia_languageserver_callbacks.vader (limited to 'test/command_callback') diff --git a/test/command_callback/julia-languageserver-project/REQUIRE b/test/command_callback/julia-languageserver-project/REQUIRE new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/julia-languageserver-project/test.jl b/test/command_callback/julia-languageserver-project/test.jl new file mode 100644 index 00000000..e69de29b diff --git a/test/command_callback/test_julia_languageserver_callbacks.vader b/test/command_callback/test_julia_languageserver_callbacks.vader new file mode 100644 index 00000000..163c9496 --- /dev/null +++ b/test/command_callback/test_julia_languageserver_callbacks.vader @@ -0,0 +1,20 @@ +Before: + call ale#assert#SetUpLinterTest('julia', 'languageserver') + +After: + call ale#assert#TearDownLinterTest() + +Execute(The default executable path should be correct): + AssertLinter 'julia', ale#Escape("julia" . " --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'") + +Execute(The executable should be configurable): + let g:ale_julia_executable = 'julia-new' + + AssertLinter 'julia-new', ale#Escape("julia-new" . " --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'") + +Execute(The project root should be detected correctly): + AssertLSPProject '' + + call ale#test#SetFilename('julia-languageserver-project/test.jl') + + AssertLSPProject ale#path#Simplify(g:dir . '/julia-languageserver-project') -- cgit v1.2.3 From 68ac4d10954b1f1d9f1ae890e0967014aeb00a52 Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Fri, 7 Sep 2018 14:13:44 -0400 Subject: Fix julia escaping + minor edits --- test/command_callback/test_julia_languageserver_callbacks.vader | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_julia_languageserver_callbacks.vader b/test/command_callback/test_julia_languageserver_callbacks.vader index 163c9496..7f5edc40 100644 --- a/test/command_callback/test_julia_languageserver_callbacks.vader +++ b/test/command_callback/test_julia_languageserver_callbacks.vader @@ -5,12 +5,12 @@ After: call ale#assert#TearDownLinterTest() Execute(The default executable path should be correct): - AssertLinter 'julia', ale#Escape("julia" . " --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'") + AssertLinter 'julia', "julia --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'" Execute(The executable should be configurable): let g:ale_julia_executable = 'julia-new' - AssertLinter 'julia-new', ale#Escape("julia-new" . " --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'") + AssertLinter 'julia-new', "julia-new --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'" Execute(The project root should be detected correctly): AssertLSPProject '' -- cgit v1.2.3 From 91bb948b908a1bcb500a34e7fd1542388ace58e1 Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Sat, 8 Sep 2018 14:11:11 -0400 Subject: Try to fix CI --- .../command_callback/test_julia_languageserver_callbacks.vader | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_julia_languageserver_callbacks.vader b/test/command_callback/test_julia_languageserver_callbacks.vader index 7f5edc40..5b377e46 100644 --- a/test/command_callback/test_julia_languageserver_callbacks.vader +++ b/test/command_callback/test_julia_languageserver_callbacks.vader @@ -5,12 +5,18 @@ After: call ale#assert#TearDownLinterTest() Execute(The default executable path should be correct): - AssertLinter 'julia', "julia --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'" + AssertLinter 'julia', + \'julia' . + \' --startup-file=no --history-file=no -e ' . + \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);') Execute(The executable should be configurable): let g:ale_julia_executable = 'julia-new' - AssertLinter 'julia-new', "julia-new --startup-file=no --history-file=no -e 'using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);'" + AssertLinter 'julia-new', + \'julia-new' . + \' --startup-file=no --history-file=no -e ' . + \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);') Execute(The project root should be detected correctly): AssertLSPProject '' -- cgit v1.2.3 From 97ed25a8bfec6c7f7abbb825ba65205b3cb1b115 Mon Sep 17 00:00:00 2001 From: Bartolomeo Stellato Date: Sun, 9 Sep 2018 10:09:05 -0400 Subject: Escape julia command + reorder table in README --- test/command_callback/test_julia_languageserver_callbacks.vader | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/command_callback') diff --git a/test/command_callback/test_julia_languageserver_callbacks.vader b/test/command_callback/test_julia_languageserver_callbacks.vader index 5b377e46..a1f3a1ae 100644 --- a/test/command_callback/test_julia_languageserver_callbacks.vader +++ b/test/command_callback/test_julia_languageserver_callbacks.vader @@ -6,7 +6,7 @@ After: Execute(The default executable path should be correct): AssertLinter 'julia', - \'julia' . + \ ale#Escape('julia') . \' --startup-file=no --history-file=no -e ' . \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);') @@ -14,7 +14,7 @@ Execute(The executable should be configurable): let g:ale_julia_executable = 'julia-new' AssertLinter 'julia-new', - \'julia-new' . + \ ale#Escape('julia-new') . \' --startup-file=no --history-file=no -e ' . \ ale#Escape('using LanguageServer; server = LanguageServer.LanguageServerInstance(STDIN, STDOUT, false); server.runlinter = true; run(server);') -- cgit v1.2.3