diff options
Diffstat (limited to 'test/functional/ui')
-rw-r--r-- | test/functional/ui/cursor_spec.lua | 17 | ||||
-rw-r--r-- | test/functional/ui/fold_spec.lua | 22 | ||||
-rw-r--r-- | test/functional/ui/messages_spec.lua | 2 |
3 files changed, 30 insertions, 11 deletions
diff --git a/test/functional/ui/cursor_spec.lua b/test/functional/ui/cursor_spec.lua index 6c913124ac..e1a72ced05 100644 --- a/test/functional/ui/cursor_spec.lua +++ b/test/functional/ui/cursor_spec.lua @@ -286,6 +286,21 @@ describe('ui/cursor', function() eq(173, named.normal.blinkon) eq(42, named.showmatch.cell_percentage) end) + + -- If there is no setting for guicursor, it becomes the default setting. + meths.set_option('guicursor', 'n:ver35-blinkwait171-blinkoff172-blinkon173-Cursor/lCursor') + screen:expect(function() + for _,m in ipairs(screen._mode_info) do + if m.name ~= 'normal' then + eq('block', m.cursor_shape or 'block') + eq(0, m.blinkon or 0) + eq(0, m.blinkoff or 0) + eq(0, m.blinkwait or 0) + eq(0, m.hl_id or 0) + eq(0, m.id_lm or 0) + end + end + end) end) it("empty 'guicursor' sets cursor_shape=block in all modes", function() @@ -297,6 +312,8 @@ describe('ui/cursor', function() if m['cursor_shape'] ~= nil then eq('block', m.cursor_shape) eq(0, m.blinkon) + eq(0, m.hl_id) + eq(0, m.id_lm) end end end) diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua index 6ec45064da..fe67b9f6b0 100644 --- a/test/functional/ui/fold_spec.lua +++ b/test/functional/ui/fold_spec.lua @@ -21,6 +21,8 @@ describe("folded lines", function() [5] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.LightGrey}, [6] = {background = Screen.colors.Yellow}, [7] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.WebGray}, + [8] = {foreground = Screen.colors.Brown }, + [9] = {bold = true, foreground = Screen.colors.Brown} }) end) @@ -29,7 +31,7 @@ describe("folded lines", function() feed("i<cr><esc>") feed("vkzf") screen:expect([[ - {5: ^+-- 2 lines: ·············}| + {7: }{5:^+-- 2 lines: ·············}| {1:~ }| {1:~ }| {1:~ }| @@ -49,8 +51,8 @@ describe("folded lines", function() funcs.setline(4, 'line 2') feed("j") screen:expect([[ - {7:+ }{5: 1 +-- 2 lines: ·························}| - {7:+ }{5: 0 ^+-- 2 lines: ·························}| + {7:+ }{8: 1 }{5:+-- 2 lines: ·························}| + {7:+ }{9: 0 }{5:^+-- 2 lines: ·························}| {1:~ }| {1:~ }| {1:~ }| @@ -130,8 +132,8 @@ describe("folded lines", function() ]]) feed('vkzf') - screen:expect([[ - {5:^+-- 2 lines: å 语 x̎͂̀̂͛͛ ﺎﻠﻋَﺮَﺒِﻳَّﺓ·················}| + screen:expect{grid=[[ + {5:^+-- 2 lines: å 语 x̎͂̀̂͛͛ العَرَبِيَّة·················}| {1:~ }| {1:~ }| {1:~ }| @@ -139,7 +141,7 @@ describe("folded lines", function() {1:~ }| {1:~ }| | - ]]) + ]]} feed_command("set noarabicshape") screen:expect([[ @@ -155,7 +157,7 @@ describe("folded lines", function() feed_command("set number foldcolumn=2") screen:expect([[ - {7:+ }{5: 1 ^+-- 2 lines: å 语 x̎͂̀̂͛͛ العَرَبِيَّة···········}| + {7:+ }{8: 1 }{5:^+-- 2 lines: å 语 x̎͂̀̂͛͛ العَرَبِيَّة···········}| {1:~ }| {1:~ }| {1:~ }| @@ -168,7 +170,7 @@ describe("folded lines", function() -- Note: too much of the folded line gets cut off.This is a vim bug. feed_command("set rightleft") screen:expect([[ - {5:+-- 2 lines: å ······················^· 1 }{7: +}| + {5:···········ةيَّبِرَعَلا x̎͂̀̂͛͛ 语 å :senil 2 --^+}{8: 1 }{7: +}| {1: ~}| {1: ~}| {1: ~}| @@ -180,7 +182,7 @@ describe("folded lines", function() feed_command("set nonumber foldcolumn=0") screen:expect([[ - {5:+-- 2 lines: å 语 x̎͂̀̂͛͛ ال·····················^·}| + {5:·················ةيَّبِرَعَلا x̎͂̀̂͛͛ 语 å :senil 2 --^+}| {1: ~}| {1: ~}| {1: ~}| @@ -192,7 +194,7 @@ describe("folded lines", function() feed_command("set arabicshape") screen:expect([[ - {5:+-- 2 lines: å 语 x̎͂̀̂͛͛ ﺍﻟ·····················^·}| + {5:·················ةيَّبِرَعَلا x̎͂̀̂͛͛ 语 å :senil 2 --^+}| {1: ~}| {1: ~}| {1: ~}| diff --git a/test/functional/ui/messages_spec.lua b/test/functional/ui/messages_spec.lua index efc02db159..5df4a1d533 100644 --- a/test/functional/ui/messages_spec.lua +++ b/test/functional/ui/messages_spec.lua @@ -323,7 +323,7 @@ describe('ui/ext_messages', function() {1:~ }| {1:~ }| ]], messages={ - {content = {{"/line [1/2] W"}}, kind = "search_count"} + {content = {{"/line W [1/2]"}}, kind = "search_count"} }} feed('n') |