diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-05-15 22:50:17 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-05-15 22:50:17 -0400 |
commit | 71450b54aa22fd1d60e5b4d0929f254a56c8869d (patch) | |
tree | a12909d6ec1a9b5cd91ff79b8d43275ab16814de /test | |
parent | 082abb7ca6f45fa937a0377a5edc68929a1c08a9 (diff) | |
parent | 92fe357a523de1a4bed0c5778389dc7d669d29c4 (diff) | |
download | rneovim-71450b54aa22fd1d60e5b4d0929f254a56c8869d.tar.gz rneovim-71450b54aa22fd1d60e5b4d0929f254a56c8869d.tar.bz2 rneovim-71450b54aa22fd1d60e5b4d0929f254a56c8869d.zip |
Merge pull request #4743 from jamessan/vim-7.4.1037
vim-patch:7.4.1037,fa73534
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/legacy/031_close_commands_spec.lua | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/test/functional/legacy/031_close_commands_spec.lua b/test/functional/legacy/031_close_commands_spec.lua index 3597cba12a..b79b1903ba 100644 --- a/test/functional/legacy/031_close_commands_spec.lua +++ b/test/functional/legacy/031_close_commands_spec.lua @@ -10,7 +10,7 @@ -- :edit local helpers = require('test.functional.helpers') -local feed, insert = helpers.feed, helpers.insert +local feed, insert, source = helpers.feed, helpers.insert, helpers.source local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect describe('Commands that close windows and/or buffers', function() @@ -84,6 +84,28 @@ describe('Commands that close windows and/or buffers', function() feed('GA 4<Esc>:all!<CR>') execute('1wincmd w') expect('testtext 2 2 2') + + -- Test ":q!" and hidden buffer. + execute('bw! Xtest1 Xtest2 Xtest3 Xtest4') + execute('sp Xtest1') + execute('wincmd w') + execute('bw!') + execute('set modified') + execute('bot sp Xtest2') + execute('set modified') + execute('bot sp Xtest3') + execute('set modified') + execute('wincmd t') + execute('hide') + execute('q!') + expect('testtext 3') + execute('q!') + feed('<CR>') + expect('testtext 1') + source([[ + q! + " Now nvim should have exited + throw "Oh, Not finished yet."]]) end) teardown(function() |