Mercurial > vim
diff src/testdir/test_terminal.vim @ 16965:ba7727889385 v8.1.1483
patch 8.1.1483: skipped tests are not properly listed
commit https://github.com/vim/vim/commit/5d30ff19648d2ff0696cea97582b902f6a4ec0ba
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 6 16:12:12 2019 +0200
patch 8.1.1483: skipped tests are not properly listed
Problem: Skipped tests are not properly listed.
Solution: Throw a "Skipped" exception instead of using ":finish" or ":return".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 06 Jun 2019 16:15:05 +0200 |
parents | 8d91579414b8 |
children | f38fcbf343ce |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -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