]> granicus.if.org Git - vim/commitdiff
patch 8.1.1619: tests are not run with GUI on Travis v8.1.1619
authorBram Moolenaar <Bram@vim.org>
Wed, 3 Jul 2019 19:40:16 +0000 (21:40 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 3 Jul 2019 19:40:16 +0000 (21:40 +0200)
Problem:    Tests are not run with GUI on Travis.
Solution:   Add a testgui job. (Ozaki Kiichi, closes #4609)

.travis.yml
src/testdir/test_highlight.vim
src/testdir/test_mapping.vim
src/testdir/test_timers.vim
src/version.c

index 8e122404f1f028160dc582d4ba8f31400d6a69c0..b669a908f612a5ef26c6df9a26c59442468af57e 100644 (file)
@@ -214,5 +214,12 @@ matrix:
         - *linux-huge
         - *asan
       after_failure: *asan_symbolize
+    - <<: *linux
+      name: huge-testgui+coverage/gcc
+      compiler: gcc
+      env:
+        - *linux-huge
+        - TEST="-C src testgui"
+      after_success: *coverage
 
 # vim:set sts=2 sw=2 tw=0 et:
index f21ebd7e25f792a0842ee1f88f8ff3b76bc07491..2499543434c327a7ad321df481f2ac1b663c4e92 100644 (file)
@@ -601,10 +601,18 @@ endfunc
 " This test must come before the Test_cursorline test, as it appears this
 " defines the Normal highlighting group anyway.
 func Test_1_highlight_Normalgroup_exists()
-  " MS-Windows GUI sets the font
-  if !has('win32') || !has('gui_running')
-    let hlNormal = HighlightArgs('Normal')
+  let hlNormal = HighlightArgs('Normal')
+  if !has('gui_running')
     call assert_match('hi Normal\s*clear', hlNormal)
+  elseif has('gui_gtk2') || has('gui_gnome') || has('gui_gtk3')
+    " expect is DEFAULT_FONT of gui_gtk_x11.c
+    call assert_match('hi Normal\s*font=Monospace 10', hlNormal)
+  elseif has('gui_motif') || has('gui_athena')
+    " expect is DEFAULT_FONT of gui_x11.c
+    call assert_match('hi Normal\s*font=7x13', hlNormal)
+  elseif has('win32')
+    " expect any font
+    call assert_match('hi Normal\s*font=.*', hlNormal)
   endif
 endfunc
 
index 7f90b0385cec01a19780c344395f06691cc7574b..184e1a451e2cb4a133d44ac234812448b48290b8 100644 (file)
@@ -399,7 +399,7 @@ func Test_motionforce_omap()
 endfunc
 
 func Test_error_in_map_expr()
-  if !has('terminal') || (has('win32') && has('gui_running'))
+  if !has('terminal') || has('gui_running')
     throw 'Skipped: cannot run Vim in a terminal window'
   endif
 
index de13bcbe89d21ae5fff85a1149bac8f2bc89f1ab..ee86e2a9709a2bf30cfe2ff09130645e96b458d6 100644 (file)
@@ -334,7 +334,7 @@ func Test_nocatch_garbage_collect()
 endfunc
 
 func Test_error_in_timer_callback()
-  if !has('terminal') || (has('win32') && has('gui_running'))
+  if !has('terminal') || has('gui_running')
     throw 'Skipped: cannot run Vim in a terminal window'
   endif
 
index 10e4c40d8ec6b8c11c26da38e1c8bb8c0aaa532b..e86b5bf2c87c3c3ebd962f48bbb55494ef9fe453 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1619,
 /**/
     1618,
 /**/