patch 8.1.1178: when mouse click tests fails value of 'ttytype' is unknown

Problem:    When mouse click tests fails value of 'ttytype' is unknown.
Solution:   Add a message to the assert.
diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim
index ddde7da..7fff535 100644
--- a/src/testdir/test_termcodes.vim
+++ b/src/testdir/test_termcodes.vim
@@ -51,14 +51,15 @@
   call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
 
   for ttymouse_val in ['xterm', 'sgr']
+    let msg = 'ttymouse=' .. ttymouse_val
     exe 'set ttymouse=' . ttymouse_val
     go
-    call assert_equal([0, 1, 1, 0], getpos('.'))
+    call assert_equal([0, 1, 1, 0], getpos('.'), msg)
     let row = 2
     let col = 6
     call MouseLeftClick(row, col)
     call MouseLeftRelease(row, col)
-    call assert_equal([0, 2, 6, 0], getpos('.'))
+    call assert_equal([0, 2, 6, 0], getpos('.'), msg)
   endfor
 
   let &mouse = save_mouse
@@ -76,26 +77,27 @@
   call setline(1, range(1, 100))
 
   for ttymouse_val in ['xterm', 'sgr']
+    let msg = 'ttymouse=' .. ttymouse_val
     exe 'set ttymouse=' . ttymouse_val
     go
-    call assert_equal(1, line('w0'))
-    call assert_equal([0, 1, 1, 0], getpos('.'))
+    call assert_equal(1, line('w0'), msg)
+    call assert_equal([0, 1, 1, 0], getpos('.'), msg)
 
     call MouseWheelDown(1, 1)
-    call assert_equal(4, line('w0'))
-    call assert_equal([0, 4, 1, 0], getpos('.'))
+    call assert_equal(4, line('w0'), msg)
+    call assert_equal([0, 4, 1, 0], getpos('.'), msg)
 
     call MouseWheelDown(1, 1)
-    call assert_equal(7, line('w0'))
-    call assert_equal([0, 7, 1, 0], getpos('.'))
+    call assert_equal(7, line('w0'), msg)
+    call assert_equal([0, 7, 1, 0], getpos('.'), msg)
 
     call MouseWheelUp(1, 1)
-    call assert_equal(4, line('w0'))
-    call assert_equal([0, 7, 1, 0], getpos('.'))
+    call assert_equal(4, line('w0'), msg)
+    call assert_equal([0, 7, 1, 0], getpos('.'), msg)
 
     call MouseWheelUp(1, 1)
-    call assert_equal(1, line('w0'))
-    call assert_equal([0, 7, 1, 0], getpos('.'))
+    call assert_equal(1, line('w0'), msg)
+    call assert_equal([0, 7, 1, 0], getpos('.'), msg)
   endfor
 
   let &mouse = save_mouse
@@ -111,6 +113,7 @@
   set mouse=a term=xterm
 
   for ttymouse_val in ['xterm', 'sgr']
+    let msg = 'ttymouse=' .. ttymouse_val
     exe 'set ttymouse=' . ttymouse_val
 
     " Split horizontally and test dragging the horizontal window separator.
@@ -124,12 +127,12 @@
       call MouseLeftClick(row, col)
       let row -= 1
       call MouseLeftDrag(row, col)
-      call assert_equal(rowseparator - 1, winheight(0) + 1)
+      call assert_equal(rowseparator - 1, winheight(0) + 1, msg)
       let row += 1
       call MouseLeftDrag(row, col)
-      call assert_equal(rowseparator, winheight(0) + 1)
+      call assert_equal(rowseparator, winheight(0) + 1, msg)
       call MouseLeftRelease(row, col)
-      call assert_equal(rowseparator, winheight(0) + 1)
+      call assert_equal(rowseparator, winheight(0) + 1, msg)
     endif
     bwipe!
 
@@ -144,12 +147,12 @@
       call MouseLeftClick(row, col)
       let col -= 1
       call MouseLeftDrag(row, col)
-      call assert_equal(colseparator - 1, winwidth(0) + 1)
+      call assert_equal(colseparator - 1, winwidth(0) + 1, msg)
       let col += 1
       call MouseLeftDrag(row, col)
-      call assert_equal(colseparator, winwidth(0) + 1)
+      call assert_equal(colseparator, winwidth(0) + 1, msg)
       call MouseLeftRelease(row, col)
-      call assert_equal(colseparator, winwidth(0) + 1)
+      call assert_equal(colseparator, winwidth(0) + 1, msg)
     endif
     bwipe!
   endfor
@@ -167,9 +170,10 @@
   set mouse=a term=xterm laststatus=2
 
   for ttymouse_val in ['xterm', 'sgr']
+    let msg = 'ttymouse=' .. ttymouse_val
     exe 'set ttymouse=' . ttymouse_val
 
-    call assert_equal(1, &cmdheight)
+    call assert_equal(1, &cmdheight, msg)
     let rowstatusline = winheight(0) + 1
     let row = rowstatusline
     let col = 1
@@ -182,15 +186,15 @@
     call MouseLeftClick(row, col)
     let row -= 1
     call MouseLeftDrag(row, col)
-    call assert_equal(2, &cmdheight)
-    call assert_equal(rowstatusline - 1, winheight(0) + 1)
+    call assert_equal(2, &cmdheight, msg)
+    call assert_equal(rowstatusline - 1, winheight(0) + 1, msg)
     let row += 1
     call MouseLeftDrag(row, col)
-    call assert_equal(1, &cmdheight)
-    call assert_equal(rowstatusline, winheight(0) + 1)
+    call assert_equal(1, &cmdheight, msg)
+    call assert_equal(rowstatusline, winheight(0) + 1, msg)
     call MouseLeftRelease(row, col)
-    call assert_equal(1, &cmdheight)
-    call assert_equal(rowstatusline, winheight(0) + 1)
+    call assert_equal(1, &cmdheight, msg)
+    call assert_equal(rowstatusline, winheight(0) + 1, msg)
   endfor
 
   let &mouse = save_mouse
@@ -207,6 +211,7 @@
   let row = 1
 
   for ttymouse_val in ['xterm', 'sgr']
+    let msg = 'ttymouse=' .. ttymouse_val
     exe 'set ttymouse=' . ttymouse_val
     e Xfoo
     tabnew Xbar
@@ -215,7 +220,7 @@
     call assert_equal(['Tab page 1',
         \              '    Xfoo',
         \              'Tab page 2',
-        \              '>   Xbar'], a)
+        \              '>   Xbar'], a, msg)
 
     " Test clicking on tab names in the tabline at the top.
     let col = 2
@@ -226,7 +231,7 @@
     call assert_equal(['Tab page 1',
         \              '>   Xfoo',
         \              'Tab page 2',
-        \              '    Xbar'], a)
+        \              '    Xbar'], a, msg)
 
     let col = 9
     call MouseLeftClick(row, col)
@@ -235,7 +240,7 @@
     call assert_equal(['Tab page 1',
         \              '    Xfoo',
         \              'Tab page 2',
-        \              '>   Xbar'], a)
+        \              '>   Xbar'], a, msg)
 
     %bwipe!
   endfor
@@ -258,6 +263,7 @@
       " When 'ttymouse' is 'xterm', row/col bigger than 223 are not supported.
       continue
     endif
+    let msg = 'ttymouse=' .. ttymouse_val
     exe 'set ttymouse=' . ttymouse_val
     e Xtab1
     tabnew Xtab2
@@ -270,7 +276,7 @@
         \              'Tab page 2',
         \              '>   Xtab2',
         \              'Tab page 3',
-        \              '    Xtab3'], a)
+        \              '    Xtab3'], a, msg)
 
     " Click on "X" in tabline to close current tab i.e. Xtab2.
     redraw
@@ -280,7 +286,7 @@
     call assert_equal(['Tab page 1',
         \              '    Xtab1',
         \              'Tab page 2',
-        \              '>   Xtab3'], a)
+        \              '>   Xtab3'], a, msg)
 
     %bwipe!
   endfor
@@ -299,6 +305,7 @@
   let row = 1
 
   for ttymouse_val in ['xterm', 'sgr']
+    let msg = 'ttymouse=' .. ttymouse_val
     exe 'set ttymouse=' . ttymouse_val
     e Xtab1
     tabnew Xtab2
@@ -307,14 +314,14 @@
     call assert_equal(['Tab page 1',
         \              '    Xtab1',
         \              'Tab page 2',
-        \              '>   Xtab2'], a)
+        \              '>   Xtab2'], a, msg)
     redraw
 
     " Click in tab2 and drag it to tab1.
     " Check getcharmod() to verify that click is not
     " interpreted as a spurious double-click.
     call MouseLeftClick(row, 10)
-    call assert_equal(0, getcharmod())
+    call assert_equal(0, getcharmod(), msg)
     for col in [9, 8, 7, 6]
       call MouseLeftDrag(row, col)
     endfor
@@ -323,7 +330,7 @@
     call assert_equal(['Tab page 1',
         \              '>   Xtab2',
         \              'Tab page 2',
-        \              '    Xtab1'], a)
+        \              '    Xtab1'], a, msg)
 
     " brief sleep to avoid causing a double-click
     sleep 20m
@@ -347,6 +354,7 @@
   let col = 10
 
   for ttymouse_val in ['xterm', 'sgr']
+    let msg = 'ttymouse=' .. ttymouse_val
     exe 'set ttymouse=' . ttymouse_val
     e Xtab1
     tabnew Xtab2
@@ -355,16 +363,16 @@
     call assert_equal(['Tab page 1',
         \              '    Xtab1',
         \              'Tab page 2',
-        \              '>   Xtab2'], a)
+        \              '>   Xtab2'], a, msg)
 
     redraw
     call MouseLeftClick(row, col)
     " Check getcharmod() to verify that first click is not
     " interpreted as a spurious double-click.
-    call assert_equal(0, getcharmod())
+    call assert_equal(0, getcharmod(), msg)
     call MouseLeftRelease(row, col)
     call MouseLeftClick(row, col)
-    call assert_equal(32, getcharmod()) " double-click
+    call assert_equal(32, getcharmod(), msg) " double-click
     call MouseLeftRelease(row, col)
     let a = split(execute(':tabs'), "\n")
     call assert_equal(['Tab page 1',
@@ -372,7 +380,7 @@
         \              'Tab page 2',
         \              '>   [No Name]',
         \              'Tab page 3',
-        \              '    Xtab2'], a)
+        \              '    Xtab2'], a, msg)
 
     if ttymouse_val !=# 'sgr'
       " We need to sleep, or else MouseLeftClick() in next loop
diff --git a/src/version.c b/src/version.c
index 939f378..585f2fd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1178,
+/**/
     1177,
 /**/
     1176,