Browse Source

tests: fix non-controversial misuse of `pending` (#11247)

Ref: https://github.com/neovim/neovim/pull/11184
tags/nightly
Daniel Hahler 1 month ago
parent
commit
4bbad54817
No account linked to committer's email address
8 changed files with 13 additions and 22 deletions
  1. +3
    -6
      test/functional/api/server_requests_spec.lua
  2. +1
    -2
      test/functional/core/job_spec.lua
  3. +3
    -4
      test/functional/ex_cmds/write_spec.lua
  4. +1
    -1
      test/functional/legacy/delete_spec.lua
  5. +1
    -1
      test/functional/terminal/tui_spec.lua
  6. +1
    -2
      test/functional/ui/cmdline_spec.lua
  7. +1
    -2
      test/functional/ui/embed_spec.lua
  8. +2
    -4
      test/functional/ui/output_spec.lua

+ 3
- 6
test/functional/api/server_requests_spec.lua View File

@@ -317,8 +317,7 @@ describe('server -> client', function()
set_session(server)
local status, address = pcall(funcs.serverstart, "127.0.0.1:")
if not status then
pending('no ipv4 stack', function() end)
return
pending('no ipv4 stack')
end
eq('127.0.0.1:', string.sub(address,1,10))
connect_test(server, 'tcp', address)
@@ -329,8 +328,7 @@ describe('server -> client', function()
set_session(server)
local status, address = pcall(funcs.serverstart, '::1:')
if not status then
pending('no ipv6 stack', function() end)
return
pending('no ipv6 stack')
end
eq('::1:', string.sub(address,1,4))
connect_test(server, 'tcp', address)
@@ -349,8 +347,7 @@ describe('server -> client', function()
it('does not deadlock', function()
if not helpers.isCI('travis') and helpers.is_os('mac') then
-- It does, in fact, deadlock on QuickBuild. #6851
pending("deadlocks on QuickBuild", function() end)
return
pending("deadlocks on QuickBuild")
end
local address = funcs.serverlist()[1]
local first = string.sub(address,1,1)

+ 1
- 2
test/functional/core/job_spec.lua View File

@@ -202,8 +202,7 @@ describe('jobs', function()
if helpers.isCI('travis') and os.getenv('CC') == 'gcc-4.9'
and helpers.is_os('mac') then
-- XXX: Hangs Travis macOS since e9061117a5b8f195c3f26a5cb94e18ddd7752d86.
pending("[Hangs on Travis macOS. #5002]", function() end)
return
pending("[Hangs on Travis macOS. #5002]")
end

nvim('command', "let j = jobstart(['cat', '-'], g:job_opts)")

+ 3
- 4
test/functional/ex_cmds/write_spec.lua View File

@@ -41,7 +41,7 @@ describe(':write', function()
command("silent !ln -s test_bkc_file.txt test_bkc_link.txt")
end
if eval('v:shell_error') ~= 0 then
pending('Cannot create symlink', function()end)
pending('Cannot create symlink')
end
source([[
edit test_bkc_link.txt
@@ -61,7 +61,7 @@ describe(':write', function()
command("silent !ln -s test_bkc_file.txt test_bkc_link.txt")
end
if eval('v:shell_error') ~= 0 then
pending('Cannot create symlink', function()end)
pending('Cannot create symlink')
end
source([[
edit test_bkc_link.txt
@@ -75,8 +75,7 @@ describe(':write', function()
it("appends FIFO file", function()
-- mkfifo creates read-only .lnk files on Windows
if iswin() or eval("executable('mkfifo')") == 0 then
pending('missing "mkfifo" command', function()end)
return
pending('missing "mkfifo" command')
end

local text = "some fifo text from write_spec"

+ 1
- 1
test/functional/legacy/delete_spec.lua View File

@@ -56,7 +56,7 @@ describe('Test for delete()', function()
endif
]])
if eval('v:shell_error') ~= 0 then
pending('Cannot create symlink', function()end)
pending('Cannot create symlink')
end
-- Delete the link, not the file
eq(0, eval("delete('Xlink')"))

+ 1
- 1
test/functional/terminal/tui_spec.lua View File

@@ -1287,7 +1287,7 @@ describe("TUI 'term' option", function()
elseif is_macos then
local status, _ = pcall(assert_term, "xterm", "xterm")
if not status then
pending("macOS: unibilium could not find terminfo", function() end)
pending("macOS: unibilium could not find terminfo")
end
else
assert_term("xterm", "xterm")

+ 1
- 2
test/functional/ui/cmdline_spec.lua View File

@@ -821,8 +821,7 @@ describe('cmdline redraw', function()

it('with <Cmd>', function()
if 'openbsd' == helpers.uname() then
pending('FIXME #10804', function() end)
return
pending('FIXME #10804')
end
command('cmap a <Cmd>call sin(0)<CR>') -- no-op
feed(':012345678901234567890123456789')

+ 1
- 2
test/functional/ui/embed_spec.lua View File

@@ -50,8 +50,7 @@ local function test_embed(ext_linegrid)

it("doesn't erase output when setting color scheme", function()
if 'openbsd' == helpers.uname() then
pending('FIXME #10804', function() end)
return
pending('FIXME #10804')
end
startup('--cmd', 'echoerr "foo"', '--cmd', 'color default', '--cmd', 'echoerr "bar"')
screen:expect([[

+ 2
- 4
test/functional/ui/output_spec.lua View File

@@ -51,8 +51,7 @@ describe("shell command :!", function()

it("throttles shell-command output greater than ~10KB", function()
if 'openbsd' == helpers.uname() then
pending('FIXME #10804', function() end)
return
pending('FIXME #10804')
end
child_session.feed_data(":!"..nvim_dir.."/shell-test REP 30001 foo\n")

@@ -96,8 +95,7 @@ describe("shell command :!", function()

it('handles control codes', function()
if iswin() then
pending('missing printf', function() end)
return
pending('missing printf')
end
local screen = Screen.new(50, 4)
screen:attach()

Loading…
Cancel
Save