patch 8.1.1051: not all ways to switch terminal mode are tested

Problem:    Not all ways to switch terminal mode are tested.
Solution:   Add more test cases.
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index aed729e..be44c14 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -1772,6 +1772,29 @@
   bwipe!
 endfunc
 
+func Test_terminal_switch_mode()
+  term
+  let bnr = bufnr('$')
+  call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
+  call feedkeys("\<C-W>N", 'xt')
+  call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
+  call feedkeys("A", 'xt')
+  call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
+  call feedkeys("\<C-W>N", 'xt')
+  call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
+  call feedkeys("I", 'xt')
+  call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
+  call feedkeys("\<C-W>Nv", 'xt')
+  call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
+  call feedkeys("I", 'xt')
+  call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
+  call feedkeys("\<C-W>Nv", 'xt')
+  call WaitForAssert({-> assert_equal('running,normal', term_getstatus(bnr))})
+  call feedkeys("A", 'xt')
+  call WaitForAssert({-> assert_equal('running', term_getstatus(bnr))})
+  bwipe!
+endfunc
+
 func Test_terminal_hidden_and_close()
   if !has('unix')
     return