summaryrefslogtreecommitdiff
path: root/test/test_ale_var.vader
blob: aee8e0482c0b87b7f71bdd6ff39084a2959a8cad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Before:
  let g:ale_some_variable = 'abc'

After:
  unlet! g:ale_some_variable

Execute(ale#Var should return global variables):
  AssertEqual 'abc', ale#Var(bufnr(''), 'some_variable')

Execute(ale#Var should return buffer overrides):
  let b:ale_some_variable = 'def'

  AssertEqual 'def', ale#Var(bufnr(''), 'some_variable')

Execute(ale#Var should throw exceptions for undefined variables):
  AssertThrows call ale#Var(bufnr(''), 'undefined_variable_name')