mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
refactor(tests): introduce testprg()
Also: - Add a describe('shell :!') section to system_spec. - Make the test for #16271 work on systems without powershell.
This commit is contained in:
@@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each)
|
||||
local Screen = require('test.functional.ui.screen')
|
||||
local thelpers = require('test.functional.terminal.helpers')
|
||||
local feed, clear, nvim = helpers.feed, helpers.clear, helpers.nvim
|
||||
local nvim_dir, command = helpers.nvim_dir, helpers.command
|
||||
local testprg, command = helpers.testprg, helpers.command
|
||||
local nvim_prog_abs = helpers.nvim_prog_abs
|
||||
local eq, eval = helpers.eq, helpers.eval
|
||||
local funcs = helpers.funcs
|
||||
@@ -28,7 +28,7 @@ describe(':terminal highlight', function()
|
||||
[11] = {background = 11},
|
||||
})
|
||||
screen:attach({rgb=false})
|
||||
command('enew | call termopen(["'..nvim_dir..'/tty-test"])')
|
||||
command(("enew | call termopen(['%s'])"):format(testprg('tty-test')))
|
||||
feed('i')
|
||||
screen:expect([[
|
||||
tty ready |
|
||||
@@ -173,7 +173,7 @@ describe(':terminal highlight forwarding', function()
|
||||
[4] = {{foreground = tonumber('0xff8000')}, {}},
|
||||
})
|
||||
screen:attach()
|
||||
command('enew | call termopen(["'..nvim_dir..'/tty-test"])')
|
||||
command(("enew | call termopen(['%s'])"):format(testprg('tty-test')))
|
||||
feed('i')
|
||||
screen:expect([[
|
||||
tty ready |
|
||||
@@ -225,7 +225,7 @@ describe(':terminal highlight with custom palette', function()
|
||||
})
|
||||
screen:attach({rgb=true})
|
||||
nvim('set_var', 'terminal_color_3', '#123456')
|
||||
command('enew | call termopen(["'..nvim_dir..'/tty-test"])')
|
||||
command(("enew | call termopen(['%s'])"):format(testprg('tty-test')))
|
||||
feed('i')
|
||||
screen:expect([[
|
||||
tty ready |
|
||||
|
Reference in New Issue
Block a user