diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-07-12 13:28:17 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-12 16:23:32 +0800 |
commit | 01afd43bc90408b43db906845245a4959c8ee3a0 (patch) | |
tree | 2386f072c52f5130d6ed83e33919dcd192f07b75 /test/functional | |
parent | 0f1b17788eb584f41d59c12c968f5e1886655334 (diff) | |
download | rneovim-01afd43bc90408b43db906845245a4959c8ee3a0.tar.gz rneovim-01afd43bc90408b43db906845245a4959c8ee3a0.tar.bz2 rneovim-01afd43bc90408b43db906845245a4959c8ee3a0.zip |
vim-patch:8.2.0275: some Ex code not covered by tests
Problem: Some Ex code not covered by tests.
Solution: Add test cases. (Yegappan Lakshmanan, closes vim/vim#5659)
https://github.com/vim/vim/commit/406cd90f1963ca60813db91c413eef4b1b78ee44
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/legacy/arglist_spec.lua | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/functional/legacy/arglist_spec.lua b/test/functional/legacy/arglist_spec.lua index 46a016ab1c..6acbaf03b2 100644 --- a/test/functional/legacy/arglist_spec.lua +++ b/test/functional/legacy/arglist_spec.lua @@ -1,8 +1,10 @@ -- Test argument list commands local helpers = require('test.functional.helpers')(after_each) +local Screen = require('test.functional.ui.screen') local clear, command, eq = helpers.clear, helpers.command, helpers.eq local eval, exc_exec, neq = helpers.eval, helpers.exc_exec, helpers.neq +local feed = helpers.feed local pcall_err = helpers.pcall_err describe('argument list commands', function() @@ -239,4 +241,39 @@ describe('argument list commands', function() command('args a b c') eq('Vim(quit):E173: 2 more files to edit', pcall_err(command, 'quit')) end) + + it(':confirm quit with unedited files in arglist', function() + local screen = Screen.new(60, 6) + screen:attach() + command('set nomore') + command('args a b c') + feed(':confirm quit\n') + screen:expect([[ + | + ~ | + | + :confirm quit | + 2 more files to edit. Quit anyway? | + [Y]es, (N)o: ^ | + ]]) + feed('N') + screen:expect([[ + ^ | + ~ | + ~ | + ~ | + ~ | + | + ]]) + feed(':confirm quit\n') + screen:expect([[ + | + ~ | + | + :confirm quit | + 2 more files to edit. Quit anyway? | + [Y]es, (N)o: ^ | + ]]) + feed('Y') + end) end) |