test: flaky loop_spec.lua #32885

Problem:
Test may fail because it matches a Lua table address, and the following
whitespace may differ depending on the stringified address length:

    test/functional/lua/loop_spec.lua:233: Row 3 did not match.
    Expected:
      |{3:                                                  }|
      |{9:Error executing callback:}                         |
      |*{9:uv_idle_t: 0x{MATCH:%w+}}                         |
      |{6:Press ENTER or type command to continue}^           |
    Actual:
      |{3:                                                  }|
      |{9:Error executing callback:}                         |
      |*{9:uv_idle_t: 0xd4c2820a00}                           |
      |{6:Press ENTER or type command to continue}^           |

Solution:
Match a variable amount of whitespace.
This commit is contained in:
Justin M. Keyes
2025-03-14 02:09:16 -07:00
committed by GitHub
parent 123f8d229e
commit 4a5585da7e

View File

@ -233,7 +233,7 @@ describe('vim.uv', function()
screen:expect([[
{3: }|
{9:Error executing callback:} |
{9:uv_idle_t: 0x{MATCH:%w+}} |
{9:uv_idle_t: 0x{MATCH:%w+}}{MATCH: +}|
{6:Press ENTER or type command to continue}^ |
]])
feed('<cr>')