From ed0d6536e34af2a2a74894e52da5734c9c8d6e17 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 24 Sep 2023 22:03:54 +0800 Subject: test: only trim trailing spaces in swapfile tests (#25341) --- test/functional/terminal/scrollback_spec.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/functional/terminal/scrollback_spec.lua') diff --git a/test/functional/terminal/scrollback_spec.lua b/test/functional/terminal/scrollback_spec.lua index 4a3005e082..1e278e4cff 100644 --- a/test/functional/terminal/scrollback_spec.lua +++ b/test/functional/terminal/scrollback_spec.lua @@ -5,7 +5,6 @@ local clear, eq, curbuf = helpers.clear, helpers.eq, helpers.curbuf local feed, testprg = helpers.feed, helpers.testprg local eval = helpers.eval local command = helpers.command -local matches = helpers.matches local poke_eventloop = helpers.poke_eventloop local retry = helpers.retry local meths = helpers.meths @@ -457,8 +456,8 @@ describe("'scrollback' option", function() expect_lines(58) -- Verify off-screen state - matches((is_os('win') and '^36: line[ ]*$' or '^35: line[ ]*$'), eval("getline(line('w0') - 1)")) - matches((is_os('win') and '^27: line[ ]*$' or '^26: line[ ]*$'), eval("getline(line('w0') - 10)")) + eq((is_os('win') and '36: line' or '35: line'), eval("getline(line('w0') - 1)->trim(' ', 2)")) + eq((is_os('win') and '27: line' or '26: line'), eval("getline(line('w0') - 10)->trim(' ', 2)")) end) it('deletes extra lines immediately', function() -- cgit