Created
June 30, 2016 08:49
-
-
Save mhinz/75d9e99a08f1ed1674ef5247c86a8314 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- assert_exception({cmd}, [, {error}]) | |
describe('assert_exception()', function() | |
it('should assert thrown exceptions properly', function() | |
source([[ | |
try | |
nocommand | |
catch | |
call assert_exception('E492') | |
endtry | |
]]) | |
expected_empty() | |
end) | |
it('should work properly when nested', function() | |
source([[ | |
try | |
nocommand | |
catch | |
try | |
" illegal argument, get NULL for error | |
call assert_exception([]) | |
catch | |
call assert_exception('E730') | |
endtry | |
endtry | |
]]) | |
expected_empty() | |
end) | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment