This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/test/test_ale_var.vader

21 lines
641 B
Text

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 return buffer overrides for buffer numbers as strings):
let b:ale_some_variable = 'def'
AssertEqual 'def', ale#Var(string(bufnr('')), 'some_variable')
Execute(ale#Var should throw exceptions for undefined variables):
AssertThrows call ale#Var(bufnr(''), 'undefined_variable_name')