diff options
| author | Daniel Hahler <git@thequod.de> | 2019-10-19 23:15:07 +0200 | 
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2019-10-19 14:15:07 -0700 | 
| commit | d89ec55c45e73544c614a3436ae16b9ea17b5535 (patch) | |
| tree | 85ec5dc1c547bf7b2f32c14c7a37c4545f9a6541 /test/unit/viml/helpers.lua | |
| parent | 3de4dc539ae938c5fdeddbdf25722fd1f6d9c77c (diff) | |
| download | rneovim-d89ec55c45e73544c614a3436ae16b9ea17b5535.tar.gz rneovim-d89ec55c45e73544c614a3436ae16b9ea17b5535.tar.bz2 rneovim-d89ec55c45e73544c614a3436ae16b9ea17b5535.zip | |
test/functional: retry/Screen: failure instead of error #11173
- Running out of retries, or unexpected screen state should make the
  test FAIL, not ERROR.
- Uses levels to report the location of the caller.
- Improve message with retry-failure (formatting).
Before:
    [ RUN      ] test: 103.53 ms ERR
    test/functional/helpers.lua:388:
    retry() attempts: 1
    test/functional/ui/screen.lua:587: Row 1 did not match.
    Expected:
      |*X^                         |
      |{0:~                        }|
      |{0:~                        }|
      |                         |
    Actual:
      |*^                         |
      |{0:~                        }|
      |{0:~                        }|
      |                         |
    To print the expect() call that would assert the current screen state, use
    screen:snapshot_util(). In case of non-deterministic failures, use
    screen:redraw_debug() to show all intermediate screen states.
    stack traceback:
            test/functional/helpers.lua:388: in function 'retry'
            test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23>
After:
    [ RUN      ] test: 105.22 ms FAIL
    test/functional/test_spec.lua:24: stopping after 1 retry() attempts.
    test/functional/test_spec.lua:25: Row 1 did not match.
    Expected:
      |*X^                         |
      |{0:~                        }|
      |{0:~                        }|
      |                         |
    Actual:
      |*^                         |
      |{0:~                        }|
      |{0:~                        }|
      |                         |
    To print the expect() call that would assert the current screen state, use
    screen:snapshot_util(). In case of non-deterministic failures, use
    screen:redraw_debug() to show all intermediate screen states.
    stack traceback:
            test/functional/helpers.lua:389: in function 'retry'
            test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23>
Diffstat (limited to 'test/unit/viml/helpers.lua')
0 files changed, 0 insertions, 0 deletions
