patch 8.0.1222: test functions interfere with each other

Problem:    Test functions interfere with each other.
Solution:   Cleanup tab pages, windows and buffers.  Reset option.
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index ae45a3e..d159382 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -133,7 +133,11 @@
     endtry
   endif
 
-  " Close any extra windows and make the current one not modified.
+  " Close any extra tab pages and windows and make the current one not modified.
+  while tabpagenr('$') > 1
+    bwipe!
+  endwhile
+
   while 1
     let wincount = winnr('$')
     if wincount == 1
@@ -146,7 +150,15 @@
       break
     endif
   endwhile
+
+  " Wipe out all buffers except the current one, then wipe the current one.
+  for nr in range(1, bufnr('$'))
+    if nr != bufnr('%') && bufexists(nr)
+      exe nr . 'bwipe!'
+    endif
+  endfor
   set nomodified
+  bwipe
 endfunc
 
 func AfterTheTest()
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 061c379..1a427f6 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -548,7 +548,7 @@
     for file in files
       call writefile(file, 'Xtest')
       split Xtest
-      call assert_equal(ft, &filetype)
+      call assert_equal(ft, &filetype, 'for text: ' . string(file))
       bwipe!
     endfor
   endfor
diff --git a/src/testdir/test_lispwords.vim b/src/testdir/test_lispwords.vim
index c7eda83..4c05504 100644
--- a/src/testdir/test_lispwords.vim
+++ b/src/testdir/test_lispwords.vim
@@ -78,4 +78,5 @@
 
   enew!
   let &cpoptions=save_copt
+  set nolisp
 endfunc
diff --git a/src/testdir/test_tabpage.vim b/src/testdir/test_tabpage.vim
index 239b1b9..95e3c13 100644
--- a/src/testdir/test_tabpage.vim
+++ b/src/testdir/test_tabpage.vim
@@ -475,6 +475,7 @@
 
 func Test_close_on_quitpre()
   " This once caused a crash
+  edit Xtest
   new
   only
   set bufhidden=delete
@@ -489,7 +490,7 @@
   while tabpagenr('$') > 1
     bwipe!
   endwhile
-  1b
+  buf Xtest
 endfunc
 
 " vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/version.c b/src/version.c
index 88d8995..1cb437b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1222,
+/**/
     1221,
 /**/
     1220,