aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/helpers.lua8
-rw-r--r--test/functional/plugin/lsp_spec.lua2
-rw-r--r--test/functional/ui/highlight_spec.lua91
-rw-r--r--test/unit/preprocess.lua4
4 files changed, 100 insertions, 5 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 03ef441ef3..a1b464af13 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -41,7 +41,13 @@ module.nvim_set = (
..' belloff= wildoptions-=pum noshowcmd noruler nomore redrawdebug=invalid')
module.nvim_argv = {
module.nvim_prog, '-u', 'NONE', '-i', 'NONE',
- '--cmd', module.nvim_set, '--embed'}
+ '--cmd', module.nvim_set,
+ '--cmd', 'unmap Y',
+ '--cmd', 'unmap <C-L>',
+ '--cmd', 'iunmap <C-U>',
+ '--cmd', 'iunmap <C-W>',
+ '--embed'}
+
-- Directory containing nvim.
module.nvim_dir = module.nvim_prog:gsub("[/\\][^/\\]+$", "")
if module.nvim_dir == module.nvim_prog then
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index 863176bfa9..3c4d01ae74 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -266,6 +266,8 @@ describe('LSP', function()
if isCI() then
pending('hangs the build on CI #14028, re-enable with freeze timeout #14204')
return
+ elseif helpers.skip_fragile(pending) then
+ return
end
local expected_handlers = {
{NIL, "shutdown", {}, 1, NIL};
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index 7471255345..499aeba6ec 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -912,6 +912,97 @@ describe('CursorLine highlight', function()
]])
end)
+ it("'cursorlineopt' screenline", function()
+ local screen = Screen.new(20,5)
+ screen:set_default_attr_ids({
+ [1] = {foreground = Screen.colors.Black, background = Screen.colors.White};
+ [2] = {foreground = Screen.colors.Yellow};
+ [3] = {foreground = Screen.colors.Red, background = Screen.colors.Green};
+ [4] = {foreground = Screen.colors.Green, background = Screen.colors.Red};
+ })
+ screen:attach()
+
+ feed_command('set wrap cursorline cursorlineopt=screenline')
+ feed_command('set showbreak=>>>')
+ feed_command('highlight clear NonText')
+ feed_command('highlight clear CursorLine')
+ feed_command('highlight NonText guifg=Yellow gui=NONE')
+ feed_command('highlight LineNr guifg=Red guibg=Green gui=NONE')
+ feed_command('highlight CursorLine guifg=Black guibg=White gui=NONE')
+ feed_command('highlight CursorLineNr guifg=Green guibg=Red gui=NONE')
+
+ feed('30iø<esc>o<esc>30ia<esc>')
+
+ -- CursorLine should not apply to 'showbreak' when 'cursorlineopt' contains "screenline"
+ screen:expect([[
+ øøøøøøøøøøøøøøøøøøøø|
+ {2:>>>}øøøøøøøøøø |
+ aaaaaaaaaaaaaaaaaaaa|
+ {2:>>>}{1:aaaaaaaaa^a }|
+ |
+ ]])
+ feed('gk')
+ screen:expect([[
+ øøøøøøøøøøøøøøøøøøøø|
+ {2:>>>}øøøøøøøøøø |
+ {1:aaaaaaaaaaaa^aaaaaaaa}|
+ {2:>>>}aaaaaaaaaa |
+ |
+ ]])
+ feed('k')
+ screen:expect([[
+ {1:øøøøøøøøøøøø^øøøøøøøø}|
+ {2:>>>}øøøøøøøøøø |
+ aaaaaaaaaaaaaaaaaaaa|
+ {2:>>>}aaaaaaaaaa |
+ |
+ ]])
+
+ -- CursorLineNr should not apply to line number when 'cursorlineopt' does not contain "number"
+ feed_command('set relativenumber numberwidth=2')
+ screen:expect([[
+ {3:0 }{1:øøøøøøøøøøøø^øøøøøø}|
+ {3: }{2:>>>}øøøøøøøøøøøø |
+ {3:1 }aaaaaaaaaaaaaaaaaa|
+ {3: }{2:>>>}aaaaaaaaaaaa |
+ |
+ ]])
+
+ -- CursorLineNr should apply to line number when 'cursorlineopt' contains "number"
+ feed_command('set cursorlineopt+=number')
+ screen:expect([[
+ {4:0 }{1:øøøøøøøøøøøø^øøøøøø}|
+ {3: }{2:>>>}øøøøøøøøøøøø |
+ {3:1 }aaaaaaaaaaaaaaaaaa|
+ {3: }{2:>>>}aaaaaaaaaaaa |
+ |
+ ]])
+ feed('gj')
+ screen:expect([[
+ {4:0 }øøøøøøøøøøøøøøøøøø|
+ {3: }{2:>>>}{1:øøøøøøøøø^øøø }|
+ {3:1 }aaaaaaaaaaaaaaaaaa|
+ {3: }{2:>>>}aaaaaaaaaaaa |
+ |
+ ]])
+ feed('gj')
+ screen:expect([[
+ {3:1 }øøøøøøøøøøøøøøøøøø|
+ {3: }{2:>>>}øøøøøøøøøøøø |
+ {4:0 }{1:aaaaaaaaaaaa^aaaaaa}|
+ {3: }{2:>>>}aaaaaaaaaaaa |
+ |
+ ]])
+ feed('gj')
+ screen:expect([[
+ {3:1 }øøøøøøøøøøøøøøøøøø|
+ {3: }{2:>>>}øøøøøøøøøøøø |
+ {4:0 }aaaaaaaaaaaaaaaaaa|
+ {3: }{2:>>>}{1:aaaaaaaaa^aaa }|
+ |
+ ]])
+ end)
+
it('always updated. vim-patch:8.1.0849', function()
local screen = Screen.new(50,5)
screen:set_default_attr_ids({
diff --git a/test/unit/preprocess.lua b/test/unit/preprocess.lua
index 3786bc2122..1073855a7d 100644
--- a/test/unit/preprocess.lua
+++ b/test/unit/preprocess.lua
@@ -89,10 +89,6 @@ local Gcc = {
get_defines_extra_flags = {'-std=c99', '-dM', '-E'},
get_declarations_extra_flags = {'-std=c99', '-P', '-E'},
}
-if ffi.abi("32bit") then
- table.insert(Gcc.get_defines_extra_flags, '-m32')
- table.insert(Gcc.get_declarations_extra_flags, '-m32')
-end
function Gcc:define(name, args, val)
local define = '-D' .. name