diff options
Diffstat (limited to 'test/functional/legacy/messages_spec.lua')
-rw-r--r-- | test/functional/legacy/messages_spec.lua | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/test/functional/legacy/messages_spec.lua b/test/functional/legacy/messages_spec.lua index b296ac909d..51c2406933 100644 --- a/test/functional/legacy/messages_spec.lua +++ b/test/functional/legacy/messages_spec.lua @@ -27,7 +27,16 @@ describe('messages', function() it('works', function() command('call setline(1, range(1, 100))') - feed(':%p#\n') + feed(':%pfoo<C-H><C-H><C-H>#') + screen:expect([[ + 1 | + 2 | + 3 | + 4 | + 5 | + :%p#^ | + ]]) + feed('\n') screen:expect([[ {2: 1 }1 | {2: 2 }2 | @@ -199,11 +208,11 @@ describe('messages', function() -- Up all the way with 'g'. feed('g') screen:expect([[ + :%p# | {2: 1 }1 | {2: 2 }2 | {2: 3 }3 | {2: 4 }4 | - {2: 5 }5 | {1:-- More --}^ | ]]) @@ -241,6 +250,18 @@ describe('messages', function() {1:Press ENTER or type command to continue}^ | ]]) + -- A command line that doesn't print text is appended to scrollback, + -- even if it invokes a nested command line. + feed([[:<C-R>=':'<CR>:<CR>g<lt>]]) + screen:expect([[ + {2: 97 }97 | + {2: 98 }98 | + {2: 99 }99 | + {2:100 }100 | + ::: | + {1:Press ENTER or type command to continue}^ | + ]]) + feed(':%p#\n') screen:expect([[ {2: 1 }1 | |