From 4556bb90facae5af15ef329e2a63d9751d380db9 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 4 Sep 2019 13:13:39 +0200 Subject: move test --- test/functional/ui/messages_spec.lua | 34 +++++++++++++++++++++++++++ test/functional/ui/screen_basic_spec.lua | 40 -------------------------------- 2 files changed, 34 insertions(+), 40 deletions(-) diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index ed65c4526f..a6b9ef9387 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -1052,3 +1052,37 @@ describe('ui/msg_puts_printf', function() os.execute('cmake -E remove_directory '..test_build_dir..'/share') end) end) + +describe('pager', function() + local screen + + before_each(function() + clear() + screen = Screen.new(25, 5) + screen:attach() + screen:set_default_attr_ids({ + [1] = {bold = true, foreground = Screen.colors.Blue1}, + [4] = {bold = true, foreground = Screen.colors.SeaGreen4}, + }) + end) + + it('can be quit', function() + command("set more") + feed(':echon join(map(range(0, &lines*2), "v:val"), "\\n")') + screen:expect{grid=[[ + 0 | + 1 | + 2 | + 3 | + {4:-- More --}^ | + ]]} + feed('q') + screen:expect{grid=[[ + ^ | + {1:~ }| + {1:~ }| + {1:~ }| + | + ]]} + end) +end) diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index f6faed747c..46f0b5060c 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -951,46 +951,6 @@ local function screen_tests(linegrid) | ]]) end) - - describe('more prompt', function() - it('can be quit', function() - command("set more") - feed(':echon join(map(range(0, &lines*2), "v:val"), "\\n")') - screen:expect{grid=[[ - 0 | - 1 | - 2 | - 3 | - 4 | - 5 | - 6 | - 7 | - 8 | - 9 | - 10 | - 11 | - 12 | - {7:-- More --}^ | - ]]} - feed('q') - screen:expect{grid=[[ - ^ | - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| - {0:~ }| - | - ]]} - end) - end) end describe("Screen (char-based)", function() -- cgit