patch 8.2.0866: not enough tests for buffer writing

Problem:    Not enough tests for buffer writing.
Solution:   Add more tests. Use CheckRunVimInTerminal in more places.
            (Yegappan Lakshmanan, closes #6167)
diff --git a/src/version.c b/src/version.c
index 4fc7c3c..b9906b3 100644
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    866,
+/**/
     865,
 /**/
     864,