test: don't use minimal timeout for "intermediate" flag (#27620)

With "intermediate" flag, only using minimal timeout is too short and
may lead to failures.
Also remove the fallback timeout in screen:expect_unchanged(), as having
a different fallback timeout than screen:expect() is confusing.
This commit is contained in:
zeertzjq
2024-02-25 13:35:24 +08:00
committed by GitHub
parent 2e1f5055ac
commit b72dc2d8ad
3 changed files with 8 additions and 12 deletions

View File

@@ -2669,10 +2669,9 @@ describe("TUI 'term' option", function()
})
local full_timeout = screen.timeout
screen.timeout = 250 -- We want screen:expect() to fail quickly.
retry(nil, 2 * full_timeout, function() -- Wait for TUI thread to set 'term'.
feed_data(":echo 'term='.(&term)\n")
screen:expect { any = 'term=' .. term_expected }
screen:expect { any = 'term=' .. term_expected, timeout = 250 }
end)
end