summaryrefslogtreecommitdiff
path: root/test/test_nimlsp_project_root.vader
blob: e702757514949d6fc61cb17e9df9cc5e36f5e0d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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(''))