patch 9.0.0059: test file has wrong name

Problem:    Test file has wrong name.
Solution:   Rename the file.  Various small fixes. (closes #10674)
diff --git a/src/getchar.c b/src/getchar.c
index 419ce74..fc15daa 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -2436,7 +2436,7 @@
     int		local_State = get_real_state();
     int		is_plug_map = FALSE;
 
-    // If typehead starts with <Plug> then remap, even for a "noremap" mapping.
+    // If typeahead starts with <Plug> then remap, even for a "noremap" mapping.
     if (typebuf.tb_len >= 3
 	    && typebuf.tb_buf[typebuf.tb_off] == K_SPECIAL
 	    && typebuf.tb_buf[typebuf.tb_off + 1] == KS_EXTRA
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index bc28632..dbda7e1 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -125,7 +125,6 @@
 	test_expand_func \
 	test_expr \
 	test_expr_utf8 \
-	test_feedkeys \
 	test_file_perm \
 	test_file_size \
 	test_filechanged \
@@ -164,6 +163,7 @@
 	test_increment \
 	test_increment_dbcs \
 	test_indent \
+	test_input \
 	test_ins_complete \
 	test_ins_complete_no_halt \
 	test_interrupt \
@@ -408,6 +408,7 @@
 	test_increment.res \
 	test_increment_dbcs.res \
 	test_indent.res \
+	test_input.res \
 	test_ins_complete.res \
 	test_ins_complete_no_halt.res \
 	test_interrupt.res \
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index 845c117..46af344 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -11,7 +11,6 @@
 source test_expand.vim
 source test_expand_dllpath.vim
 source test_expand_func.vim
-source test_feedkeys.vim
 source test_file_perm.vim
 source test_fnamemodify.vim
 source test_ga.vim
diff --git a/src/testdir/test_feedkeys.vim b/src/testdir/test_feedkeys.vim
deleted file mode 100644
index fb64711..0000000
--- a/src/testdir/test_feedkeys.vim
+++ /dev/null
@@ -1,37 +0,0 @@
-" Test feedkeys() function.
-
-func Test_feedkeys_x_with_empty_string()
-  new
-  call feedkeys("ifoo\<Esc>")
-  call assert_equal('', getline('.'))
-  call feedkeys('', 'x')
-  call assert_equal('foo', getline('.'))
-
-  " check it goes back to normal mode immediately.
-  call feedkeys('i', 'x')
-  call assert_equal('foo', getline('.'))
-  quit!
-endfunc
-
-func Test_feedkeys_with_abbreviation()
-  new
-  inoreabbrev trigger value
-  call feedkeys("atrigger ", 'x')
-  call feedkeys("atrigger ", 'x')
-  call assert_equal('value value ', getline(1))
-  bwipe!
-  iunabbrev trigger
-endfunc
-
-func Test_feedkeys_escape_special()
-  nnoremap … <Cmd>let g:got_ellipsis += 1<CR>
-  call feedkeys('…', 't')
-  call assert_equal('…', getcharstr())
-  let g:got_ellipsis = 0
-  call feedkeys('…', 'xt')
-  call assert_equal(1, g:got_ellipsis)
-  unlet g:got_ellipsis
-  nunmap …
-endfunc
-
-" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_input.vim b/src/testdir/test_input.vim
new file mode 100644
index 0000000..3b1e2eb
--- /dev/null
+++ b/src/testdir/test_input.vim
@@ -0,0 +1,61 @@
+" Tests for character input and feedkeys() function.
+
+func Test_feedkeys_x_with_empty_string()
+  new
+  call feedkeys("ifoo\<Esc>")
+  call assert_equal('', getline('.'))
+  call feedkeys('', 'x')
+  call assert_equal('foo', getline('.'))
+
+  " check it goes back to normal mode immediately.
+  call feedkeys('i', 'x')
+  call assert_equal('foo', getline('.'))
+  quit!
+endfunc
+
+func Test_feedkeys_with_abbreviation()
+  new
+  inoreabbrev trigger value
+  call feedkeys("atrigger ", 'x')
+  call feedkeys("atrigger ", 'x')
+  call assert_equal('value value ', getline(1))
+  bwipe!
+  iunabbrev trigger
+endfunc
+
+func Test_feedkeys_escape_special()
+  nnoremap … <Cmd>let g:got_ellipsis += 1<CR>
+  call feedkeys('…', 't')
+  call assert_equal('…', getcharstr())
+  let g:got_ellipsis = 0
+  call feedkeys('…', 'xt')
+  call assert_equal(1, g:got_ellipsis)
+  unlet g:got_ellipsis
+  nunmap …
+endfunc
+
+func Test_input_simplify_ctrl_at()
+  new
+  " feeding unsimplified CTRL-@ should still trigger i_CTRL-@
+  call feedkeys("ifoo\<Esc>A\<*C-@>x", 'xt')
+  call assert_equal('foofo', getline(1))
+  bw!
+endfunc
+
+func Test_input_simplify_noremap()
+  call feedkeys("i\<*C-M>", 'nx')
+  call assert_equal('', getline(1))
+  call assert_equal([0, 2, 1, 0, 1], getcurpos())
+  bw!
+endfunc
+
+func Test_input_simplify_timedout()
+  inoremap <C-M>a b
+  call feedkeys("i\<*C-M>", 'xt')
+  call assert_equal('', getline(1))
+  call assert_equal([0, 2, 1, 0, 1], getcurpos())
+  iunmap <C-M>a
+  bw!
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim
index fbe592d..01418bd 100644
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -65,7 +65,9 @@
   let &pastetoggle = str
   call assert_equal(str, &pastetoggle)
   call assert_equal("\n  pastetoggle=" .. strtrans(str), execute('set pastetoggle?'))
+
   unlet str
+  set pastetoggle&
 endfunc
 
 func Test_wildchar()
@@ -899,7 +901,6 @@
 func Test_rightleftcmd()
   CheckFeature rightleft
   set rightleft
-  set rightleftcmd
 
   let g:l = []
   func AddPos()
@@ -908,6 +909,13 @@
   endfunc
   cmap <expr> <F2> AddPos()
 
+  set rightleftcmd=
+  call feedkeys("/\<F2>abc\<Right>\<F2>\<Left>\<Left>\<F2>" ..
+        \ "\<Right>\<F2>\<Esc>", 'xt')
+  call assert_equal([2, 5, 3, 4], g:l)
+
+  let g:l = []
+  set rightleftcmd=search
   call feedkeys("/\<F2>abc\<Left>\<F2>\<Right>\<Right>\<F2>" ..
         \ "\<Left>\<F2>\<Esc>", 'xt')
   call assert_equal([&co - 1, &co - 4, &co - 2, &co - 3], g:l)
diff --git a/src/testdir/test_statusline.vim b/src/testdir/test_statusline.vim
index 7c75f61..e60140f 100644
--- a/src/testdir/test_statusline.vim
+++ b/src/testdir/test_statusline.vim
@@ -7,6 +7,14 @@
 source check.vim
 source screendump.vim
 
+func SetUp()
+  set laststatus=2
+endfunc
+
+func TearDown()
+  set laststatus&
+endfunc
+
 func s:get_statusline()
   return ScreenLines(&lines - 1, &columns)[0]
 endfunc
@@ -35,7 +43,6 @@
 
 func Test_caught_error_in_statusline()
   let s:func_in_statusline_called = 0
-  set laststatus=2
   let statusline = '%{StatuslineWithCaughtError()}'
   let &statusline = statusline
   redrawstatus
@@ -46,7 +53,6 @@
 
 func Test_statusline_will_be_disabled_with_error()
   let s:func_in_statusline_called = 0
-  set laststatus=2
   let statusline = '%{StatuslineWithError()}'
   try
     let &statusline = statusline
@@ -73,7 +79,6 @@
   call assert_match('^ ((2) of 2)\s*$', s:get_statusline())
 
   only
-  set laststatus=2
   set splitbelow
   call setline(1, range(1, 10000))
 
@@ -432,7 +437,6 @@
   %bw!
   call delete('Xstatusline')
   set statusline&
-  set laststatus&
   set splitbelow&
 endfunc
 
@@ -518,7 +522,6 @@
 " with a custom 'statusline'
 func Test_statusline_mbyte_fillchar()
   only
-  set laststatus=2
   set fillchars=vert:\|,fold:-,stl:━,stlnc:═
   set statusline=a%=b
   call assert_match('^a\+━\+b$', s:get_statusline())
@@ -526,7 +529,7 @@
   call assert_match('^a\+━\+b━a\+═\+b$', s:get_statusline())
   wincmd w
   call assert_match('^a\+═\+b═a\+━\+b$', s:get_statusline())
-  set statusline& fillchars& laststatus&
+  set statusline& fillchars&
   %bw!
 endfunc
 
diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim
index 87c0474..6e4bbd1 100644
--- a/src/testdir/test_termcodes.vim
+++ b/src/testdir/test_termcodes.vim
@@ -2437,28 +2437,5 @@
   call assert_notequal(-1, index(output, 'builtin_dumb'))
 endfunc
 
-func Test_simplify_ctrl_at()
-  " feeding unsimplified CTRL-@ should still trigger i_CTRL-@
-  call feedkeys("ifoo\<Esc>A\<*C-@>x", 'xt')
-  call assert_equal('foofo', getline(1))
-  bw!
-endfunc
-
-func Test_simplify_noremap()
-  call feedkeys("i\<*C-M>", 'nx')
-  call assert_equal('', getline(1))
-  call assert_equal([0, 2, 1, 0, 1], getcurpos())
-  bw!
-endfunc
-
-func Test_simplify_timedout()
-  inoremap <C-M>a b
-  call feedkeys("i\<*C-M>", 'xt')
-  call assert_equal('', getline(1))
-  call assert_equal([0, 2, 1, 0, 1], getcurpos())
-  iunmap <C-M>a
-  bw!
-endfunc
-
 
 " vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/testdir/test_timers.vim b/src/testdir/test_timers.vim
index 7a5cc29..338be10 100644
--- a/src/testdir/test_timers.vim
+++ b/src/testdir/test_timers.vim
@@ -369,7 +369,7 @@
 
 " Test that the garbage collector isn't triggered if a timer callback invokes
 " vgetc().
-func Test_timer_nocatch_garbage_collect()
+func Test_nocatch_timer_garbage_collect()
   " 'uptimetime. must be bigger than the timer timeout
   set ut=200
   call test_garbagecollect_soon()
diff --git a/src/version.c b/src/version.c
index 4db3a24..b57ab69 100644
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    59,
+/**/
     58,
 /**/
     57,
diff --git a/src/vim.h b/src/vim.h
index a4da185..eeeeb69 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -2819,7 +2819,7 @@
 #define UC_BUFFER	1	// -buffer: local to current buffer
 #define UC_VIM9		2	// {} argument: Vim9 syntax.
 
-// flags used by vim_strsave_escaped()
+// flags used by vim_strsave_fnameescape()
 #define VSE_NONE	0
 #define VSE_SHELL	1	// escape for a shell command
 #define VSE_BUFFER	2	// escape for a ":buffer" command