Skip to content

Commit bb404f5

Browse files
zeertzjqbrammool
authored andcommitted
patch 9.0.0059: test file has wrong name
Problem: Test file has wrong name. Solution: Rename the file. Various small fixes. (closes #10674)
1 parent 81a3ff9 commit bb404f5

File tree

10 files changed

+50
-36
lines changed

10 files changed

+50
-36
lines changed

src/getchar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2436,7 +2436,7 @@ handle_mapping(
24362436
int local_State = get_real_state();
24372437
int is_plug_map = FALSE;
24382438

2439-
// If typehead starts with <Plug> then remap, even for a "noremap" mapping.
2439+
// If typeahead starts with <Plug> then remap, even for a "noremap" mapping.
24402440
if (typebuf.tb_len >= 3
24412441
&& typebuf.tb_buf[typebuf.tb_off] == K_SPECIAL
24422442
&& typebuf.tb_buf[typebuf.tb_off + 1] == KS_EXTRA

src/testdir/Make_all.mak

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ NEW_TESTS = \
125125
test_expand_func \
126126
test_expr \
127127
test_expr_utf8 \
128-
test_feedkeys \
129128
test_file_perm \
130129
test_file_size \
131130
test_filechanged \
@@ -164,6 +163,7 @@ NEW_TESTS = \
164163
test_increment \
165164
test_increment_dbcs \
166165
test_indent \
166+
test_input \
167167
test_ins_complete \
168168
test_ins_complete_no_halt \
169169
test_interrupt \
@@ -408,6 +408,7 @@ NEW_TESTS_RES = \
408408
test_increment.res \
409409
test_increment_dbcs.res \
410410
test_indent.res \
411+
test_input.res \
411412
test_ins_complete.res \
412413
test_ins_complete_no_halt.res \
413414
test_interrupt.res \

src/testdir/test_alot.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ source test_ex_mode.vim
1111
source test_expand.vim
1212
source test_expand_dllpath.vim
1313
source test_expand_func.vim
14-
source test_feedkeys.vim
1514
source test_file_perm.vim
1615
source test_fnamemodify.vim
1716
source test_ga.vim
Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
" Test feedkeys() function.
1+
" Tests for character input and feedkeys() function.
22

33
func Test_feedkeys_x_with_empty_string()
44
new
@@ -34,4 +34,28 @@ func Test_feedkeys_escape_special()
3434
nunmap
3535
endfunc
3636

37+
func Test_input_simplify_ctrl_at()
38+
new
39+
" feeding unsimplified CTRL-@ should still trigger i_CTRL-@
40+
call feedkeys("ifoo\<Esc>A\<*C-@>x", 'xt')
41+
call assert_equal('foofo', getline(1))
42+
bw!
43+
endfunc
44+
45+
func Test_input_simplify_noremap()
46+
call feedkeys("i\<*C-M>", 'nx')
47+
call assert_equal('', getline(1))
48+
call assert_equal([0, 2, 1, 0, 1], getcurpos())
49+
bw!
50+
endfunc
51+
52+
func Test_input_simplify_timedout()
53+
inoremap <C-M>a b
54+
call feedkeys("i\<*C-M>", 'xt')
55+
call assert_equal('', getline(1))
56+
call assert_equal([0, 2, 1, 0, 1], getcurpos())
57+
iunmap <C-M>a
58+
bw!
59+
endfunc
60+
3761
" vim: shiftwidth=2 sts=2 expandtab

src/testdir/test_options.vim

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ func Test_pastetoggle()
6565
let &pastetoggle = str
6666
call assert_equal(str, &pastetoggle)
6767
call assert_equal("\n pastetoggle=" .. strtrans(str), execute('set pastetoggle?'))
68+
6869
unlet str
70+
set pastetoggle&
6971
endfunc
7072

7173
func Test_wildchar()
@@ -899,7 +901,6 @@ endfunc
899901
func Test_rightleftcmd()
900902
CheckFeature rightleft
901903
set rightleft
902-
set rightleftcmd
903904

904905
let g:l = []
905906
func AddPos()
@@ -908,6 +909,13 @@ func Test_rightleftcmd()
908909
endfunc
909910
cmap <expr> <F2> AddPos()
910911
912+
set rightleftcmd=
913+
call feedkeys("/\<F2>abc\<Right>\<F2>\<Left>\<Left>\<F2>" ..
914+
\ "\<Right>\<F2>\<Esc>", 'xt')
915+
call assert_equal([2, 5, 3, 4], g:l)
916+
917+
let g:l = []
918+
set rightleftcmd=search
911919
call feedkeys("/\<F2>abc\<Left>\<F2>\<Right>\<Right>\<F2>" ..
912920
\ "\<Left>\<F2>\<Esc>", 'xt')
913921
call assert_equal([&co - 1, &co - 4, &co - 2, &co - 3], g:l)

src/testdir/test_statusline.vim

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ source view_util.vim
77
source check.vim
88
source screendump.vim
99

10+
func SetUp()
11+
set laststatus=2
12+
endfunc
13+
14+
func TearDown()
15+
set laststatus&
16+
endfunc
17+
1018
func s:get_statusline()
1119
return ScreenLines(&lines - 1, &columns)[0]
1220
endfunc
@@ -35,7 +43,6 @@ endfunc
3543

3644
func Test_caught_error_in_statusline()
3745
let s:func_in_statusline_called = 0
38-
set laststatus=2
3946
let statusline = '%{StatuslineWithCaughtError()}'
4047
let &statusline = statusline
4148
redrawstatus
@@ -46,7 +53,6 @@ endfunc
4653

4754
func Test_statusline_will_be_disabled_with_error()
4855
let s:func_in_statusline_called = 0
49-
set laststatus=2
5056
let statusline = '%{StatuslineWithError()}'
5157
try
5258
let &statusline = statusline
@@ -73,7 +79,6 @@ func Test_statusline()
7379
call assert_match('^ ((2) of 2)\s*$', s:get_statusline())
7480

7581
only
76-
set laststatus=2
7782
set splitbelow
7883
call setline(1, range(1, 10000))
7984

@@ -432,7 +437,6 @@ func Test_statusline()
432437
%bw!
433438
call delete('Xstatusline')
434439
set statusline&
435-
set laststatus&
436440
set splitbelow&
437441
endfunc
438442

@@ -518,15 +522,14 @@ endfunc
518522
" with a custom 'statusline'
519523
func Test_statusline_mbyte_fillchar()
520524
only
521-
set laststatus=2
522525
set fillchars=vert:\|,fold:-,stl:━,stlnc:═
523526
set statusline=a%=b
524527
call assert_match('^a\+━\+b$', s:get_statusline())
525528
vnew
526529
call assert_match('^a\+━\+b━a\+═\+b$', s:get_statusline())
527530
wincmd w
528531
call assert_match('^a\+═\+b═a\+━\+b$', s:get_statusline())
529-
set statusline& fillchars& laststatus&
532+
set statusline& fillchars&
530533
%bw!
531534
endfunc
532535

src/testdir/test_termcodes.vim

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,28 +2437,5 @@ func Test_terminal_builtin_without_gui()
24372437
call assert_notequal(-1, index(output, 'builtin_dumb'))
24382438
endfunc
24392439

2440-
func Test_simplify_ctrl_at()
2441-
" feeding unsimplified CTRL-@ should still trigger i_CTRL-@
2442-
call feedkeys("ifoo\<Esc>A\<*C-@>x", 'xt')
2443-
call assert_equal('foofo', getline(1))
2444-
bw!
2445-
endfunc
2446-
2447-
func Test_simplify_noremap()
2448-
call feedkeys("i\<*C-M>", 'nx')
2449-
call assert_equal('', getline(1))
2450-
call assert_equal([0, 2, 1, 0, 1], getcurpos())
2451-
bw!
2452-
endfunc
2453-
2454-
func Test_simplify_timedout()
2455-
inoremap <C-M>a b
2456-
call feedkeys("i\<*C-M>", 'xt')
2457-
call assert_equal('', getline(1))
2458-
call assert_equal([0, 2, 1, 0, 1], getcurpos())
2459-
iunmap <C-M>a
2460-
bw!
2461-
endfunc
2462-
24632440

24642441
" vim: shiftwidth=2 sts=2 expandtab

src/testdir/test_timers.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ endfunc
369369

370370
" Test that the garbage collector isn't triggered if a timer callback invokes
371371
" vgetc().
372-
func Test_timer_nocatch_garbage_collect()
372+
func Test_nocatch_timer_garbage_collect()
373373
" 'uptimetime. must be bigger than the timer timeout
374374
set ut=200
375375
call test_garbagecollect_soon()

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,8 @@ static char *(features[]) =
735735

736736
static int included_patches[] =
737737
{ /* Add new patch number below this line */
738+
/**/
739+
59,
738740
/**/
739741
58,
740742
/**/

src/vim.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2819,7 +2819,7 @@ long elapsed(DWORD start_tick);
28192819
#define UC_BUFFER 1 // -buffer: local to current buffer
28202820
#define UC_VIM9 2 // {} argument: Vim9 syntax.
28212821

2822-
// flags used by vim_strsave_escaped()
2822+
// flags used by vim_strsave_fnameescape()
28232823
#define VSE_NONE 0
28242824
#define VSE_SHELL 1 // escape for a shell command
28252825
#define VSE_BUFFER 2 // escape for a ":buffer" command

0 commit comments

Comments
 (0)