diff options
author | 2020-09-27 11:57:13 -0400 | |
---|---|---|
committer | 2020-09-27 11:57:13 -0400 | |
commit | a71ec5d1a41162813cbf5bd17a9db93a67005574 (patch) | |
tree | 076cb5dcbe88b970af88115f1556950692696cc9 /test | |
parent | a40d3c6e039359d5e53f2eeb68bf1ad92de9f004 (diff) | |
download | textadept-a71ec5d1a41162813cbf5bd17a9db93a67005574.tar.gz textadept-a71ec5d1a41162813cbf5bd17a9db93a67005574.zip |
Fixed `io.quick_open()` not doing anything when file limit was exceeded.
Diffstat (limited to 'test')
-rw-r--r-- | test/test.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test.lua b/test/test.lua index 270aaa7b..7cdbf350 100644 --- a/test/test.lua +++ b/test/test.lua @@ -540,6 +540,12 @@ function test_file_io_quick_open_interactive() assert(buffer.filename:find('%.lua$'), '.lua file filter did not work') buffer:close() end + local quick_open_max = io.quick_open_max + io.quick_open_max = 10 + io.quick_open(_HOME) + assert(#_BUFFERS > num_buffers, 'File limit exceeded notification did not occur') + buffer:close() + io.quick_open_max = quick_open_max -- restore lfs.chdir(cwd) assert_raises(function() io.quick_open(1) end, 'string/table/nil expected, got number') |