File: test_puppet_path_detection.vader

package info (click to toggle)
vim-ale 3.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,408 kB
  • sloc: sh: 497; python: 311; perl: 31; makefile: 4; javascript: 1
file content (22 lines) | stat: -rw-r--r-- 773 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Before:
  call ale#test#SetDirectory('/testplugin/test')

  runtime ale_linters/puppet/languageserver.vim

After:
  call ale#test#RestoreDirectory()
  call ale#linter#Reset()

Execute(old-style module should find its root correctly):
  call ale#test#SetFilename('test-files/puppet/old-style-module/manifests/init.pp')

  AssertEqual
  \ ale#path#Simplify(g:dir . '/test-files/puppet/old-style-module'),
  \ ale_linters#puppet#languageserver#GetProjectRoot(bufnr(''))

Execute(new-style module should find its root correctly):
  call ale#test#SetFilename('test-files/puppet/new-style-module/lib/puppet/types/exampletype.rb')

  AssertEqual
  \ ale#path#Simplify(g:dir . '/test-files/puppet/new-style-module'),
  \ ale_linters#puppet#languageserver#GetProjectRoot(bufnr(''))