diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/editor/mode_cmdline_spec.lua | 21 | ||||
-rw-r--r-- | test/functional/lua/system_spec.lua | 12 | ||||
-rw-r--r-- | test/unit/vterm_spec.lua | 20 |
3 files changed, 41 insertions, 12 deletions
diff --git a/test/functional/editor/mode_cmdline_spec.lua b/test/functional/editor/mode_cmdline_spec.lua index efd7a37c0b..bb74dfe12f 100644 --- a/test/functional/editor/mode_cmdline_spec.lua +++ b/test/functional/editor/mode_cmdline_spec.lua @@ -38,6 +38,27 @@ describe('cmdline', function() feed([[:<C-R>="foo\nbar\rbaz"<CR>]]) eq('foo\nbar\rbaz', fn.getcmdline()) end) + + it('pasting handles composing chars properly', function() + local screen = Screen.new(60, 4) + -- 'arabicshape' cheats and always redraws everything which trivially works, + -- this test is for partial redraws in 'noarabicshape' mode. + command('set noarabicshape') + screen:attach() + fn.setreg('a', '💻') + feed(':test 🧑') + screen:expect([[ + | + {1:~ }|*2 + :test 🧑^ | + ]]) + feed('<c-r><c-r>a') + screen:expect([[ + | + {1:~ }|*2 + :test 🧑💻^ | + ]]) + end) end) it('Ctrl-Shift-V supports entering unsimplified key notations', function() diff --git a/test/functional/lua/system_spec.lua b/test/functional/lua/system_spec.lua index 482bfcf1a9..afbada007d 100644 --- a/test/functional/lua/system_spec.lua +++ b/test/functional/lua/system_spec.lua @@ -9,7 +9,7 @@ local function system_sync(cmd, opts) return exec_lua(function() local obj = vim.system(cmd, opts) - if opts.timeout then + if opts and opts.timeout then -- Minor delay before calling wait() so the timeout uv timer can have a headstart over the -- internal call to vim.wait() in wait(). vim.wait(10) @@ -75,7 +75,7 @@ describe('vim.system', function() it('kill processes', function() exec_lua(function() - local signal + local signal --- @type integer? local cmd = vim.system({ 'cat', '-' }, { stdin = true }, function(r) signal = r.signal end) -- run forever @@ -112,4 +112,12 @@ describe('vim.system', function() ) eq(true, exec_lua([[return _G.processed]])) end) + + if t.is_os('win') then + it('can resolve windows command extentions.', function() + t.write_file('test.bat', 'echo hello world') + system_sync({ 'chmod', '+x', 'test.bat' }) + system_sync({ './test' }) + end) + end end) diff --git a/test/unit/vterm_spec.lua b/test/unit/vterm_spec.lua index f0cf450e6c..4ea5d9c29a 100644 --- a/test/unit/vterm_spec.lua +++ b/test/unit/vterm_spec.lua @@ -2705,7 +2705,7 @@ describe('vterm', function() pen('font', 0, state) -- TODO(dundargoc): fix - -- -- Foreground + -- Foreground -- push "\x1b[31m" -- ?pen foreground = idx(1) -- push "\x1b[32m" @@ -2721,7 +2721,7 @@ describe('vterm', function() -- push "\x1b[39m" -- ?pen foreground = rgb(240,240,240,is_default_fg) -- - -- -- Background + -- Background -- push "\x1b[41m" -- ?pen background = idx(1) -- push "\x1b[42m" @@ -2737,7 +2737,7 @@ describe('vterm', function() -- push "\x1b[49m" -- ?pen background = rgb(0,0,0,is_default_bg) -- - -- -- Bold+ANSI colour == highbright + -- Bold+ANSI colour == highbright -- push "\x1b[m\x1b[1;37m" -- ?pen bold = on -- ?pen foreground = idx(15) @@ -2745,7 +2745,7 @@ describe('vterm', function() -- ?pen bold = on -- ?pen foreground = idx(15) -- - -- -- Super/Subscript + -- Super/Subscript -- push "\x1b[73m" -- ?pen small = on -- ?pen baseline = raise @@ -2756,7 +2756,7 @@ describe('vterm', function() -- ?pen small = off -- ?pen baseline = normal -- - -- -- DECSTR resets pen attributes + -- DECSTR resets pen attributes -- push "\x1b[1;4m" -- ?pen bold = on -- ?pen underline = 1 @@ -2896,25 +2896,25 @@ describe('vterm', function() expect('selection-query mask=0001') -- TODO(dundargoc): fix - -- -- Send clipboard; final chunk len 4 + -- Send clipboard; final chunk len 4 -- SELECTION 1 ["Hello,"] -- output "\x1b]52;c;" -- output "SGVsbG8s" -- output "\x1b\\" -- - -- -- Send clipboard; final chunk len 3 + -- Send clipboard; final chunk len 3 -- SELECTION 1 ["Hello, w"] -- output "\x1b]52;c;" -- output "SGVsbG8s" -- output "IHc=\x1b\\" -- - -- -- Send clipboard; final chunk len 2 + -- Send clipboard; final chunk len 2 -- SELECTION 1 ["Hello, world\n"] -- output "\x1b]52;c;" -- output "SGVsbG8sIHdvcmxk" -- output "Cg==\x1b\\" -- - -- -- Send clipboard; split between chunks + -- Send clipboard; split between chunks -- SELECTION 1 ["Hel" -- output "\x1b]52;c;" -- output "SGVs" @@ -2922,7 +2922,7 @@ describe('vterm', function() -- output "bG8s" -- output "\x1b\\" -- - -- -- Send clipboard; split within chunk + -- Send clipboard; split within chunk -- SELECTION 1 ["Hello" -- output "\x1b]52;c;" -- output "SGVs" |