comparison src/testdir/test_search.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 a32169a40566
children 9c4ddc78df74
comparison
equal deleted inserted replaced
16964:45ff4207d530 16965:ba7727889385
797 call Incsearch_cleanup() 797 call Incsearch_cleanup()
798 endfunc 798 endfunc
799 799
800 func Test_incsearch_scrolling() 800 func Test_incsearch_scrolling()
801 if !CanRunVimInTerminal() 801 if !CanRunVimInTerminal()
802 return 802 throw 'Skipped: cannot make screendumps'
803 endif 803 endif
804 call assert_equal(0, &scrolloff) 804 call assert_equal(0, &scrolloff)
805 call writefile([ 805 call writefile([
806 \ 'let dots = repeat(".", 120)', 806 \ 'let dots = repeat(".", 120)',
807 \ 'set incsearch cmdheight=2 scrolloff=0', 807 \ 'set incsearch cmdheight=2 scrolloff=0',
830 func Test_incsearch_search_dump() 830 func Test_incsearch_search_dump()
831 if !exists('+incsearch') 831 if !exists('+incsearch')
832 return 832 return
833 endif 833 endif
834 if !CanRunVimInTerminal() 834 if !CanRunVimInTerminal()
835 return 835 throw 'Skipped: cannot make screendumps'
836 endif 836 endif
837 call writefile([ 837 call writefile([
838 \ 'set incsearch hlsearch scrolloff=0', 838 \ 'set incsearch hlsearch scrolloff=0',
839 \ 'for n in range(1, 8)', 839 \ 'for n in range(1, 8)',
840 \ ' call setline(n, "foo " . n)', 840 \ ' call setline(n, "foo " . n)',
885 func Test_incsearch_substitute_dump() 885 func Test_incsearch_substitute_dump()
886 if !exists('+incsearch') 886 if !exists('+incsearch')
887 return 887 return
888 endif 888 endif
889 if !CanRunVimInTerminal() 889 if !CanRunVimInTerminal()
890 return 890 throw 'Skipped: cannot make screendumps'
891 endif 891 endif
892 call writefile([ 892 call writefile([
893 \ 'set incsearch hlsearch scrolloff=0', 893 \ 'set incsearch hlsearch scrolloff=0',
894 \ 'for n in range(1, 10)', 894 \ 'for n in range(1, 10)',
895 \ ' call setline(n, "foo " . n)', 895 \ ' call setline(n, "foo " . n)',
981 call delete('Xis_subst_script') 981 call delete('Xis_subst_script')
982 endfunc 982 endfunc
983 983
984 func Test_incsearch_with_change() 984 func Test_incsearch_with_change()
985 if !has('timers') || !exists('+incsearch') || !CanRunVimInTerminal() 985 if !has('timers') || !exists('+incsearch') || !CanRunVimInTerminal()
986 return 986 throw 'Skipped: cannot make screendumps and/or timers feature and/or incsearch option missing'
987 endif 987 endif
988 988
989 call writefile([ 989 call writefile([
990 \ 'set incsearch hlsearch scrolloff=0', 990 \ 'set incsearch hlsearch scrolloff=0',
991 \ 'call setline(1, ["one", "two ------ X", "three"])', 991 \ 'call setline(1, ["one", "two ------ X", "three"])',
1009 func Test_incsearch_sort_dump() 1009 func Test_incsearch_sort_dump()
1010 if !exists('+incsearch') 1010 if !exists('+incsearch')
1011 return 1011 return
1012 endif 1012 endif
1013 if !CanRunVimInTerminal() 1013 if !CanRunVimInTerminal()
1014 return 1014 throw 'Skipped: cannot make screendumps'
1015 endif 1015 endif
1016 call writefile([ 1016 call writefile([
1017 \ 'set incsearch hlsearch scrolloff=0', 1017 \ 'set incsearch hlsearch scrolloff=0',
1018 \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])', 1018 \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])',
1019 \ ], 'Xis_sort_script') 1019 \ ], 'Xis_sort_script')
1035 func Test_incsearch_vimgrep_dump() 1035 func Test_incsearch_vimgrep_dump()
1036 if !exists('+incsearch') 1036 if !exists('+incsearch')
1037 return 1037 return
1038 endif 1038 endif
1039 if !CanRunVimInTerminal() 1039 if !CanRunVimInTerminal()
1040 return 1040 throw 'Skipped: cannot make screendumps'
1041 endif 1041 endif
1042 call writefile([ 1042 call writefile([
1043 \ 'set incsearch hlsearch scrolloff=0', 1043 \ 'set incsearch hlsearch scrolloff=0',
1044 \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])', 1044 \ 'call setline(1, ["another one 2", "that one 3", "the one 1"])',
1045 \ ], 'Xis_vimgrep_script') 1045 \ ], 'Xis_vimgrep_script')