Mercurial > vim
comparison runtime/doc/testing.txt @ 32452:c1f730c2b51e v9.0.1557
patch 9.0.1557: test failures for unreachable code
Commit: https://github.com/vim/vim/commit/9d383f30bbd06552ad0bf343b2c03c6a0d1f6df2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 14 21:38:12 2023 +0100
patch 9.0.1557: test failures for unreachable code
Problem: Test failures for unreachable code.
Solution: Add a test override to ignore unreachable code.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 14 May 2023 22:45:04 +0200 |
parents | 2a17771529af |
children | 635de73eeb4c |
comparison
equal
deleted
inserted
replaced
32451:88d0403cc156 | 32452:c1f730c2b51e |
---|---|
367 starting reset the "starting" variable, see below | 367 starting reset the "starting" variable, see below |
368 term_props reset all terminal properties when the version | 368 term_props reset all terminal properties when the version |
369 string is detected | 369 string is detected |
370 ui_delay time in msec to use in ui_delay(); overrules a | 370 ui_delay time in msec to use in ui_delay(); overrules a |
371 wait time of up to 3 seconds for messages | 371 wait time of up to 3 seconds for messages |
372 unreachable no error for code after `:throw` and `:return` | |
372 uptime overrules sysinfo.uptime | 373 uptime overrules sysinfo.uptime |
373 vterm_title setting the window title by a job running in a | 374 vterm_title setting the window title by a job running in a |
374 terminal window | 375 terminal window |
375 ALL clear all overrides, except alloc_lines ({val} is | 376 ALL clear all overrides, except alloc_lines ({val} is |
376 not used) | 377 not used) |
377 | 378 |
378 "starting" is to be used when a test should behave like | 379 "starting" is to be used when a test should behave like |
379 startup was done. Since the tests are run by sourcing a | 380 startup was done. Since the tests are run by sourcing a |
380 script the "starting" variable is non-zero. This is usually a | 381 script the "starting" variable is non-zero. This is usually a |
381 good thing (tests run faster), but sometimes changes behavior | 382 good thing (tests run faster), but sometimes this changes |
382 in a way that the test doesn't work properly. | 383 behavior in a way that the test doesn't work properly. |
383 When using: > | 384 When using: > |
384 call test_override('starting', 1) | 385 call test_override('starting', 1) |
385 < The value of "starting" is saved. It is restored by: > | 386 < The value of "starting" is saved. It is restored by: > |
386 call test_override('starting', 0) | 387 call test_override('starting', 0) |
388 | |
389 < To make sure the flag is reset later using `:defer` can be | |
390 useful: > | |
391 call test_override('unreachable', 1) | |
392 defer call test_override('unreachable', 0) | |
387 | 393 |
388 < Can also be used as a |method|: > | 394 < Can also be used as a |method|: > |
389 GetOverrideVal()-> test_override('starting') | 395 GetOverrideVal()-> test_override('starting') |
390 | 396 |
391 | 397 |