diff options
author | 2020-03-16 11:13:42 -0400 | |
---|---|---|
committer | 2020-03-16 11:13:42 -0400 | |
commit | 2b99026b05f3c0d1d2eef0892e91cee72f968f5f (patch) | |
tree | bda1e88e6cb88f4ed71c719c9547d72ec33c8cdc /test/test.lua | |
parent | 23a9f5b45e2eedf8366e0b0b45450190b66dd3f2 (diff) | |
download | textadept-2b99026b05f3c0d1d2eef0892e91cee72f968f5f.tar.gz textadept-2b99026b05f3c0d1d2eef0892e91cee72f968f5f.zip |
Detect and allow jumping to internal Lua errors.
Diffstat (limited to 'test/test.lua')
-rw-r--r-- | test/test.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test.lua b/test/test.lua index af0ec708..fc0d9e27 100644 --- a/test/test.lua +++ b/test/test.lua @@ -2282,6 +2282,16 @@ function test_run_build() end unstable(test_run_build) +function test_run_goto_internal_lua_error() + xpcall(error, function(message) events.emit(events.ERROR, debug.traceback(message)) end, 'internal error', 2) + if #_VIEWS > 1 then view:unsplit() end + textadept.run.goto_error(LINE(1)) + assert(buffer.filename:find('/test/test%.lua$'), 'did not detect internal Lua error') + view:unsplit() + io.close_buffer() + io.close_buffer() +end + -- TODO: test textadept.run.run_in_background function test_session_save() @@ -2736,6 +2746,8 @@ function test_lexer_api() assert_raises(function() lexer.line_from_position = nil end, 'read-only') end +-- TODO: test init.lua's buffer settings + -------------------------------------------------------------------------------- assert(not WIN32 and not OSX, 'Test suite currently only runs on Linux') |