diff options
author | w0rp <devw0rp@gmail.com> | 2017-04-16 00:16:48 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-04-16 00:16:48 +0100 |
commit | e80116cee03af66bb229c3f570f0b2f244f0a197 (patch) | |
tree | fbbce032e7d3db51b6dc50c71467d1e64f09a4b5 /test | |
parent | 7682fab2947ea13b2427bfdf2b42c30168712f92 (diff) | |
download | ale-e80116cee03af66bb229c3f570f0b2f244f0a197.zip |
#427 Add a function for looking up ALE variables in buffer scope, and then global scope
Diffstat (limited to 'test')
-rw-r--r-- | test/test_ale_var.vader | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_ale_var.vader b/test/test_ale_var.vader new file mode 100644 index 00000000..aee8e048 --- /dev/null +++ b/test/test_ale_var.vader @@ -0,0 +1,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') |