summaryrefslogtreecommitdiff
path: root/test/linter
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2023-09-16 23:25:39 +0100
committerw0rp <devw0rp@gmail.com>2023-09-16 23:25:39 +0100
commitbd9fc580a1cda702e8aa3de0d06086468fdaf3f4 (patch)
tree76050b5ee39f943aee591cf16adc1a0d25878941 /test/linter
parentdca621b6755a47469c94ee8fd26f390e34804077 (diff)
downloadale-bd9fc580a1cda702e8aa3de0d06086468fdaf3f4.zip
Close #4541 - Fix Haskell project root detection
We weren't joining and returning paths correctly for detecting project roots for Haskell projects, and now we are. Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita@gmail.com>
Diffstat (limited to 'test/linter')
-rw-r--r--test/linter/test_haskell_hls.vader10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/linter/test_haskell_hls.vader b/test/linter/test_haskell_hls.vader
index 4452d53c..59a50078 100644
--- a/test/linter/test_haskell_hls.vader
+++ b/test/linter/test_haskell_hls.vader
@@ -30,3 +30,13 @@ Execute(Should accept configuration settings):
AssertLSPConfig {}
let b:ale_haskell_hls_config = {'haskell': {'maxCompletions': 250}}
AssertLSPConfig {'haskell': {'maxCompletions': 250}}
+
+Execute(We should detect the root with cabal.project files, preferred over *.cabal files):
+ call ale#test#SetFilename('../test-files/haskell/haskell-packages-project/package-a/src/folder/dummy.hs')
+
+ AssertLSPProject ale#test#GetFilename('../test-files/haskell/haskell-packages-project')
+
+Execute(We should a project root with *.cabal files):
+ call ale#test#SetFilename('../test-files/haskell/haskell-simple-package/package-a/src/folder/dummy.hs')
+
+ AssertLSPProject ale#test#GetFilename('../test-files/haskell/haskell-simple-package/package-a')