summaryrefslogtreecommitdiff
path: root/test/test_nimlsp_project_root.vader
diff options
context:
space:
mode:
authorBartek thindil Jasicki <thindil@laeran.pl>2019-10-18 18:15:05 +0200
committerBartek thindil Jasicki <thindil@laeran.pl>2019-10-18 18:15:05 +0200
commit8239b76c5a4c765ffa04cb5c6ad0ad94cd1d0dea (patch)
treea06e6d34aad2fea419ae92109fc6319dadda2758 /test/test_nimlsp_project_root.vader
parent6d5d3fa4dd1cc18a5b90c587502ad37323df08a3 (diff)
parentc06467438dff38b939fd81b32395296d01a59df6 (diff)
downloadale-8239b76c5a4c765ffa04cb5c6ad0ad94cd1d0dea.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'test/test_nimlsp_project_root.vader')
-rw-r--r--test/test_nimlsp_project_root.vader19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test_nimlsp_project_root.vader b/test/test_nimlsp_project_root.vader
new file mode 100644
index 00000000..e7027575
--- /dev/null
+++ b/test/test_nimlsp_project_root.vader
@@ -0,0 +1,19 @@
+Before:
+ runtime ale_linters/nim/nimlsp.vim
+ call ale#test#SetDirectory('/testplugin/test')
+
+After:
+ if isdirectory(g:dir . '/.git')
+ call delete(g:dir . '/.git', 'd')
+ endif
+
+ call ale#test#RestoreDirectory()
+ call ale#linter#Reset()
+
+
+Execute(Detect root of nim project with .git/ correctly):
+ call ale#test#SetFilename('nim-test-files/with-git/src/source.nim')
+ call mkdir(g:dir . '/.git')
+ AssertEqual
+ \ ale#path#Simplify(g:dir),
+ \ ale_linters#nim#nimlsp#GetProjectRoot(bufnr(''))