mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
refactor(getchar): rename test variable (#34769)
Also, test_disable_char_avail() is superseded by test_override() in Vim, so remove that from vim_diff.txt.
This commit is contained in:
@@ -872,9 +872,8 @@ Startup:
|
|||||||
Test functions:
|
Test functions:
|
||||||
- test_alloc_fail()
|
- test_alloc_fail()
|
||||||
- test_autochdir()
|
- test_autochdir()
|
||||||
- test_disable_char_avail()
|
|
||||||
- test_feedinput()
|
- test_feedinput()
|
||||||
- test_garbagecollect_soon
|
- test_garbagecollect_soon()
|
||||||
- test_getvalue()
|
- test_getvalue()
|
||||||
- test_ignore_error()
|
- test_ignore_error()
|
||||||
- test_null_blob()
|
- test_null_blob()
|
||||||
@@ -892,6 +891,8 @@ Test functions:
|
|||||||
- test_setmouse()
|
- test_setmouse()
|
||||||
- test_settime()
|
- test_settime()
|
||||||
- test_srand_seed()
|
- test_srand_seed()
|
||||||
|
- test_unknown()
|
||||||
|
- test_void()
|
||||||
|
|
||||||
TUI:
|
TUI:
|
||||||
*t_xx* *termcap-options* *t_AB* *t_Sb* *t_vb* *t_SI*
|
*t_xx* *termcap-options* *t_AB* *t_Sb* *t_vb* *t_SI*
|
||||||
|
@@ -1866,7 +1866,7 @@ int vpeekc_any(void)
|
|||||||
/// @return true if a character is available, false otherwise.
|
/// @return true if a character is available, false otherwise.
|
||||||
bool char_avail(void)
|
bool char_avail(void)
|
||||||
{
|
{
|
||||||
if (disable_char_avail_for_testing) {
|
if (test_disable_char_avail) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
no_mapping++;
|
no_mapping++;
|
||||||
|
@@ -17,7 +17,7 @@ typedef enum {
|
|||||||
|
|
||||||
enum { NSCRIPT = 15, }; ///< Maximum number of streams to read script from
|
enum { NSCRIPT = 15, }; ///< Maximum number of streams to read script from
|
||||||
|
|
||||||
EXTERN bool disable_char_avail_for_testing INIT( = false);
|
EXTERN bool test_disable_char_avail INIT( = false);
|
||||||
|
|
||||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||||
# include "getchar.h.generated.h"
|
# include "getchar.h.generated.h"
|
||||||
|
@@ -171,7 +171,7 @@ if s:has_ffi
|
|||||||
lua << trim EOF
|
lua << trim EOF
|
||||||
require('ffi').cdef([[
|
require('ffi').cdef([[
|
||||||
int starting;
|
int starting;
|
||||||
bool disable_char_avail_for_testing;
|
bool test_disable_char_avail;
|
||||||
]])
|
]])
|
||||||
EOF
|
EOF
|
||||||
endif
|
endif
|
||||||
@@ -200,7 +200,7 @@ func Ntest_override(name, val)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if a:name ==# 'char_avail' || a:name ==# 'ALL'
|
if a:name ==# 'char_avail' || a:name ==# 'ALL'
|
||||||
exe 'lua require("ffi").C.disable_char_avail_for_testing =' a:val
|
exe 'lua require("ffi").C.test_disable_char_avail =' a:val
|
||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user