]> granicus.if.org Git - vim/commitdiff
patch 8.1.1483: skipped tests are not properly listed v8.1.1483
authorBram Moolenaar <Bram@vim.org>
Thu, 6 Jun 2019 14:12:12 +0000 (16:12 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 6 Jun 2019 14:12:12 +0000 (16:12 +0200)
Problem:    Skipped tests are not properly listed.
Solution:   Throw a "Skipped" exception instead of using ":finish" or ":return".

22 files changed:
src/testdir/test_balloon.vim
src/testdir/test_breakindent.vim
src/testdir/test_cdo.vim
src/testdir/test_channel.vim
src/testdir/test_clientserver.vim
src/testdir/test_conceal.vim
src/testdir/test_debugger.vim
src/testdir/test_diffmode.vim
src/testdir/test_fold.vim
src/testdir/test_highlight.vim
src/testdir/test_popup.vim
src/testdir/test_popupwin.vim
src/testdir/test_search.vim
src/testdir/test_startup.vim
src/testdir/test_startup_utf8.vim
src/testdir/test_syntax.vim
src/testdir/test_tabpage.vim
src/testdir/test_termencoding.vim
src/testdir/test_terminal.vim
src/testdir/test_textprop.vim
src/testdir/test_timers.vim
src/version.c

index 37fc57eb5c277fc5787f4cc06cb049f3f7a970e4..abf7d6944e6dad96a435f16e70e314cdac7c98bf 100644 (file)
@@ -9,7 +9,7 @@ if !has('gui_running')
 
 source screendump.vim
 if !CanRunVimInTerminal()
-  throw 'Skipped: cannot run Vim in a terminal window'
+  throw 'Skipped: cannot make screendumps'
 endif
 
 let s:common_script =<< [CODE]
index ae05479cae54597e1fa3d727f0c1990ad9d8b30e..1dd5aa6b036eb53b9c738f6876bccf494b182ee6 100644 (file)
@@ -5,7 +5,7 @@
 " It helps to change the tabstop setting and force a redraw (e.g. see
 " Test_breakindent08())
 if !exists('+breakindent')
-  finish
+  throw 'Skipped: breakindent option not supported'
 endif
 
 source view_util.vim
index 988de1dd266c4f0cfd06bfb7b714014565e85439..aa2e4f1a8c349f6d7055f1ef26b5f9a25a1ba42b 100644 (file)
@@ -1,7 +1,7 @@
 " Tests for the :cdo, :cfdo, :ldo and :lfdo commands
 
 if !has('quickfix')
-  finish
+  throw 'Skipped: quickfix feature missing'
 endif
 
 " Create the files used by the tests
index 2f2b5597fb31b3231ae5477f149b57138c94937b..982a0459a156cff9328d0f4df493a60e59cb5764 100644 (file)
@@ -1,7 +1,7 @@
 " Test for channel functions.
 
 if !has('channel')
-  finish
+  throw 'Skipped: channel feature missing'
 endif
 
 source shared.vim
@@ -9,7 +9,7 @@ source shared.vim
 let s:python = PythonProg()
 if s:python == ''
   " Can't run this test without Python.
-  finish
+  throw 'Skipped: Python command missing'
 endif
 
 " Uncomment the next line to see what happens. Output is in
index 5c01ac46fec9f292c2b4a310722d71bf2f6e9436..3377f86126d8cdab0a5de1cbfe3d0348f10c14be 100644 (file)
@@ -1,7 +1,7 @@
 " Tests for the +clientserver feature.
 
 if !has('job') || !has('clientserver')
-  finish
+  throw 'Skipped: job and/or clientserver feature missing'
 endif
 
 source shared.vim
index 66384e1c156d46869cd35ff66f6e3195b152b95c..f114651c2111e0a15f042f908e53677df4af760e 100644 (file)
@@ -2,12 +2,12 @@
 " Also see test88.in (should be converted to a test function here).
 
 if !has('conceal')
-  finish
+  throw 'Skipped: conceal feature missing'
 endif
 
 source screendump.vim
 if !CanRunVimInTerminal()
-  finish
+  throw 'Skipped: cannot make screendumps'
 endif
 
 func Test_conceal_two_windows()
index 4c3d6721f1f2cfe6ca4261cd4baa6c0efb8e31fb..4528b2bdbc87767884da183912224fccb04d0a67 100644 (file)
@@ -22,7 +22,7 @@ endfunc
 " Debugger tests
 func Test_Debugger()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
 
   " Create a Vim script with some functions
index 81913c89a99051435c4dd989dd223d140cdeb4cf..e5a3f2fcf462e3050ac88b4e36737e194c5871bd 100644 (file)
@@ -748,7 +748,7 @@ endfunc
 
 func Test_diff_screen()
   if !CanRunVimInTerminal() || !has('menu')
-    return
+    throw 'Skipped: cannot make screendumps and/or menu feature missing'
   endif
   " clean up already existing swap files, just in case
   call delete('.Xfile1.swp')
@@ -880,7 +880,7 @@ endfunc
 
 func Test_diff_with_cursorline()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
 
   call writefile([
@@ -907,7 +907,7 @@ endfunc
 
 func Test_diff_of_diff()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
 
   call writefile([
index 9ad82181c330fbc462e837cc51decb05aa20202a..ed87007c1958da7ba7bd14670eafa6ccf3e2232a 100644 (file)
@@ -708,7 +708,7 @@ endfunc
 
 func Test_folds_with_rnu()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
 
   call writefile([
index 454845700df1a082e8c619afb49d96894191431b..78dbead8b9b9b73243a1f0ac01378a08a1b4df3d 100644 (file)
@@ -533,7 +533,7 @@ endfunc
 
 func Test_cursorline_after_yank()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
 
   call writefile([
@@ -555,7 +555,7 @@ endfunc
 
 func Test_cursorline_with_visualmode()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
 
   call writefile([
@@ -575,7 +575,7 @@ endfunc
 
 func Test_wincolor()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
 
   call writefile([
index 538dd220ca3f230ce6b6543db52dbe6ab2d10896..edb039944cac01cac47d9eb40e9921ad72d7fefc 100644 (file)
@@ -735,7 +735,7 @@ endfunc
 
 func Test_popup_and_previewwindow_dump()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   call writefile([
     \ 'set previewheight=9',
@@ -797,7 +797,7 @@ endfunc
 
 func Test_popup_position()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   call writefile([
        \ '123456789_123456789_123456789_a',
@@ -839,7 +839,7 @@ endfunc
 
 func Test_popup_command()
   if !CanRunVimInTerminal() || !has('menu')
-    return
+    throw 'Skipped: cannot make screendumps and/or menu feature missing'
   endif
 
   call writefile([
index 50165ec62f06e9a266cb8840b8c1d35ed5bb9bc1..46a5d6d3f51d55cb4379dd2f6f1971299b4e146d 100644 (file)
@@ -1,14 +1,14 @@
 " Tests for popup windows
 
 if !has('textprop')
-  finish
+  throw 'Skipped: textprop feature missing'
 endif
 
 source screendump.vim
 
 func Test_simple_popup()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   call writefile([
        \ "call setline(1, range(1, 100))",
@@ -58,7 +58,7 @@ endfunc
 
 func Test_popup_with_border_and_padding()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
 
   for iter in range(0, 1)
@@ -128,7 +128,7 @@ endfunc
 
 func Test_popup_with_syntax_win_execute()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   call writefile([
        \ "call setline(1, range(1, 100))",
@@ -152,7 +152,7 @@ endfunc
 
 func Test_popup_with_syntax_setbufvar()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   let lines =<< trim END
        call setline(1, range(1, 100))
@@ -177,7 +177,7 @@ endfunc
 
 func Test_popup_all_corners()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   let lines =<< trim END
        call setline(1, repeat([repeat('-', 60)], 15))
@@ -340,7 +340,7 @@ endfunc
 
 func Test_popup_with_wrap()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   let lines =<< trim END
         call setline(1, range(1, 100))
@@ -359,7 +359,7 @@ endfunc
 
 func Test_popup_without_wrap()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   let lines =<< trim END
         call setline(1, range(1, 100))
@@ -760,7 +760,7 @@ endfunc
 
 func Test_popup_never_behind()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   " +-----------------------------+
   " |             |               |
index 8090deeeb75a4cd41925e26d45bf970e4f1dff02..2765c8cbf81efe2985619d774ad8c8d5e3022093 100644 (file)
@@ -799,7 +799,7 @@ endfunc
 
 func Test_incsearch_scrolling()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   call assert_equal(0, &scrolloff)
   call writefile([
@@ -832,7 +832,7 @@ func Test_incsearch_search_dump()
     return
   endif
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   call writefile([
        \ 'set incsearch hlsearch scrolloff=0',
@@ -887,7 +887,7 @@ func Test_incsearch_substitute_dump()
     return
   endif
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   call writefile([
        \ 'set incsearch hlsearch scrolloff=0',
@@ -983,7 +983,7 @@ endfunc
 
 func Test_incsearch_with_change()
   if !has('timers') || !exists('+incsearch') || !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps and/or timers feature and/or incsearch option missing'
   endif
 
   call writefile([
@@ -1011,7 +1011,7 @@ func Test_incsearch_sort_dump()
     return
   endif
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   call writefile([
        \ 'set incsearch hlsearch scrolloff=0',
@@ -1037,7 +1037,7 @@ func Test_incsearch_vimgrep_dump()
     return
   endif
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   call writefile([
        \ 'set incsearch hlsearch scrolloff=0',
index 0ce8c81e6d31daac123343eab922e5d108452e18..41bb12f20d9050d1b44ffa526917c7a56b425769 100644 (file)
@@ -659,7 +659,7 @@ endfunc
 
 func Test_start_with_tabs()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
 
   let buf = RunVimInTerminal('-p a b c', {})
index 8b3eca10d762d9fc2f01d539d088ba92dc9dc947..1b3d2184a02d54622c978bdf7ec3d6e5971ab319 100644 (file)
@@ -63,7 +63,7 @@ endfunc
 
 func Test_detect_ambiwidth()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
 
   " Use the title termcap entries to output the escape sequence.
index 143f97ae8119e9331f270d9e58330575dadc42a0..bdcef511473d7814cfd8355702ea20631ab44137 100644 (file)
@@ -536,7 +536,7 @@ endfunc
 " Check highlighting for a small piece of C code with a screen dump.
 func Test_syntax_c()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
   call writefile([
        \ '/* comment line at the top */',
index 60a5f3d9682d12cebe175763d261e9bc5470ef46..e22206767471a9b9538b3aae2ae7844c89768c1d 100644 (file)
@@ -555,7 +555,7 @@ endfunc
 
 func Test_tabpage_cmdheight()
   if !CanRunVimInTerminal()
-    throw 'Skipped: only works with terminal'
+    throw 'Skipped: cannot make screendumps'
   endif
   call writefile([
         \ 'set laststatus=2',
index f4f5c5aaa9ed9e4fd24e642b312e96f3f839f443..49fb9d8a9fa60914d83dc7716489ccf7538b553b 100644 (file)
@@ -3,12 +3,12 @@
 
 " This only works with "iconv".
 if !has('iconv')
-  finish
+  throw 'Skipped: iconv feature missing'
 endif
 
 source screendump.vim
 if !CanRunVimInTerminal()
-  finish
+  throw 'Skipped: cannot make screendumps'
 endif
 
 " This Vim is running with 'encoding' "utf-8", the Vim in the terminal is
index 9d6fddd01cca07a999e4967d30a13bde081d7036..5fab97510bb024a084a792e35a3161ff96fb3f61 100644 (file)
@@ -1037,7 +1037,7 @@ endfunc
 " argument, check that :confirm qall works.
 func Test_terminal_qall_prompt()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   let buf = RunVimInTerminal('', {})
 
@@ -1098,7 +1098,7 @@ endfunc
 
 func Test_terminal_dumpwrite_composing()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   let save_enc = &encoding
   set encoding=utf-8
@@ -1224,7 +1224,7 @@ endfunc
 
 func Test_terminal_api_drop_newwin()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   let buf = Api_drop_common('')
   call assert_equal(0, &bin)
@@ -1237,7 +1237,7 @@ endfunc
 
 func Test_terminal_api_drop_newwin_bin()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   let buf = Api_drop_common(',{"bin":1}')
   call assert_equal(1, &bin)
@@ -1249,7 +1249,7 @@ endfunc
 
 func Test_terminal_api_drop_newwin_binary()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   let buf = Api_drop_common(',{"binary":1}')
   call assert_equal(1, &bin)
@@ -1261,7 +1261,7 @@ endfunc
 
 func Test_terminal_api_drop_newwin_nobin()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   set binary
   let buf = Api_drop_common(',{"nobin":1}')
@@ -1275,7 +1275,7 @@ endfunc
 
 func Test_terminal_api_drop_newwin_nobinary()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   set binary
   let buf = Api_drop_common(',{"nobinary":1}')
@@ -1289,7 +1289,7 @@ endfunc
 
 func Test_terminal_api_drop_newwin_ff()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   let buf = Api_drop_common(',{"ff":"dos"}')
   call assert_equal("dos", &ff)
@@ -1301,7 +1301,7 @@ endfunc
 
 func Test_terminal_api_drop_newwin_fileformat()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   let buf = Api_drop_common(',{"fileformat":"dos"}')
   call assert_equal("dos", &ff)
@@ -1313,7 +1313,7 @@ endfunc
 
 func Test_terminal_api_drop_newwin_enc()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   let buf = Api_drop_common(',{"enc":"utf-16"}')
   call assert_equal("utf-16", &fenc)
@@ -1325,7 +1325,7 @@ endfunc
 
 func Test_terminal_api_drop_newwin_encoding()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   let buf = Api_drop_common(',{"encoding":"utf-16"}')
   call assert_equal("utf-16", &fenc)
@@ -1337,7 +1337,7 @@ endfunc
 
 func Test_terminal_api_drop_oldwin()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   let firstwinid = win_getid()
   split Xtextfile
@@ -1380,7 +1380,7 @@ endfunc
 
 func Test_terminal_api_call()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
 
   call WriteApiCall('Tapi_TryThis')
@@ -1397,7 +1397,7 @@ endfunc
 
 func Test_terminal_api_call_fails()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
 
   call WriteApiCall('TryThis')
@@ -1423,7 +1423,7 @@ endfunc
 
 func Test_terminal_api_call_fail_delete()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
 
   call WriteApiCall('Tapi_Delete')
@@ -1507,7 +1507,7 @@ endfunc
 
 func Test_terminal_all_ansi_colors()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
 
   " Use all the ANSI colors.
@@ -1564,7 +1564,7 @@ endfunc
 
 func Test_terminal_termwinsize_option_fixed()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   set termwinsize=6x40
   let text = []
@@ -2030,7 +2030,7 @@ endfunc
 
 func Test_terminal_getwinpos()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
 
   " split, go to the bottom-right window
index cb86186b4b7b79fa6bd18cb230172d2bd92be582..bfd39d5da07fbe7a006b2e18d14493b2ea3e2b4e 100644 (file)
@@ -655,7 +655,7 @@ endfunc
 func Test_textprop_screenshot_various()
   " The Vim running in the terminal needs to use utf-8.
   if !CanRunVimInTerminal() || g:orig_encoding != 'utf-8'
-    return
+    throw 'Skipped: cannot make screendumps or not using utf-8'
   endif
   call writefile([
        \ "call setline(1, ["
@@ -750,7 +750,7 @@ endfunc
 " screenshot test with Visual block mode operations
 func Test_textprop_screenshot_visual()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot make screendumps'
   endif
 
   " Delete two columns while text props are three chars wide.
index e900b1f5d8a201cfce0313fb61f1da3c56f0e1ed..963cc23276a525f46f782dc6addc60a037bdda3f 100644 (file)
@@ -281,7 +281,7 @@ endfunc
 
 func Test_restore_count()
   if !CanRunVimInTerminal()
-    return
+    throw 'Skipped: cannot run Vim in a terminal window'
   endif
   " Check that v:count is saved and restored, not changed by a timer.
   call writefile([
index 2687eb943174009bd2743238250eebdef59b5bb1..c8a3cf6706bb48d65ad76806bcc0ec755a369d7b 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1483,
 /**/
     1482,
 /**/