patch 8.2.0270: some code not covered by tests

Problem:    Some code not covered by tests.
Solution:   Add test cases. (Yegappan Lakshmanan, closes #5649)
diff --git a/src/testdir/test_tabpage.vim b/src/testdir/test_tabpage.vim
index bf721a0..35c9fd0 100644
--- a/src/testdir/test_tabpage.vim
+++ b/src/testdir/test_tabpage.vim
@@ -139,7 +139,11 @@
   call assert_fails("tabmove -99", 'E474:')
   call assert_fails("tabmove -3+", 'E474:')
   call assert_fails("tabmove $3", 'E474:')
+  call assert_fails("%tabonly", 'E16:')
   1tabonly!
+  tabnew
+  call assert_fails("-2tabmove", 'E474:')
+  tabonly!
 endfunc
 
 " Test autocommands
@@ -609,4 +613,14 @@
   call delete('XTest_tabpage_cmdheight')
 endfunc
 
+" Test for closing the tab page from a command window
+func Test_tabpage_close_cmdwin()
+  tabnew
+  call feedkeys("q/:tabclose\<CR>\<Esc>", 'xt')
+  call assert_equal(2, tabpagenr('$'))
+  call feedkeys("q/:tabonly\<CR>\<Esc>", 'xt')
+  call assert_equal(2, tabpagenr('$'))
+  tabonly
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab