]> granicus.if.org Git - vim/commitdiff
patch 8.1.1121: test for term_gettitle() was disabled v8.1.1121
authorBram Moolenaar <Bram@vim.org>
Sat, 6 Apr 2019 10:39:55 +0000 (12:39 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 6 Apr 2019 10:39:55 +0000 (12:39 +0200)
Problem:    Test for term_gettitle() was disabled.
Solution:   Enable the test and bail out only when it doesn't work. (Dominique
            Pelle, closes #3776)

src/testdir/test_terminal.vim
src/version.c

index be44c14eaf474b32e93de4cff4eaf60f2af69e41..cae5439b6a9d9070da08f83f904280970dcd3cbf 100644 (file)
@@ -1842,17 +1842,15 @@ func Test_terminal_no_job()
 endfunc
 
 func Test_term_gettitle()
-  if !has('title') || empty(&t_ts)
-    return
-  endif
-  " TODO: this fails on Travis
-  return
-
   " term_gettitle() returns an empty string for a non-terminal buffer
-  " or for a non-existing buffer.
+  " and for a non-existing buffer.
   call assert_equal('', term_gettitle(bufnr('%')))
   call assert_equal('', term_gettitle(bufnr('$') + 1))
 
+  if !has('title') || &title == 0 || empty(&t_ts)
+    throw "Skipped: can't get/set title"
+  endif
+
   let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'])
   call WaitForAssert({-> assert_equal('[No Name] - VIM', term_gettitle(term)) })
 
index b3d7abc74c681adeb4554574d2be752a34205023..1563e6384d4e2fb15bc27979b06623a30860824f 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1121,
 /**/
     1120,
 /**/