aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-17 10:19:31 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-07-18 06:18:03 +0800
commit457ab65ff3f7a7d3eecb45d4f3b48ab8a0295e52 (patch)
tree7bfcb7a0cc38e6a2473f8c21ce58d4dd6b828276 /test
parentf17d81933067c5356f1c8419218d61aaaec9046c (diff)
downloadrneovim-457ab65ff3f7a7d3eecb45d4f3b48ab8a0295e52.tar.gz
rneovim-457ab65ff3f7a7d3eecb45d4f3b48ab8a0295e52.tar.bz2
rneovim-457ab65ff3f7a7d3eecb45d4f3b48ab8a0295e52.zip
vim-patch:9.0.1257: code style is not check in test scripts
Problem: Code style is not check in test scripts. Solution: Add basic code style check for test files. https://github.com/vim/vim/commit/94722c510745a0cfd494c51625a514b92dd2bfb2 Use Test_test_files() from latest Vim. Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/runtest.vim12
-rw-r--r--test/old/testdir/summarize.vim2
-rw-r--r--test/old/testdir/test_autocmd.vim6
-rw-r--r--test/old/testdir/test_blob.vim2
-rw-r--r--test/old/testdir/test_blockedit.vim2
-rw-r--r--test/old/testdir/test_codestyle.vim39
-rw-r--r--test/old/testdir/test_diffmode.vim8
-rw-r--r--test/old/testdir/test_edit.vim2
-rw-r--r--test/old/testdir/test_expand_func.vim6
-rw-r--r--test/old/testdir/test_fold.vim4
-rw-r--r--test/old/testdir/test_goto.vim34
-rw-r--r--test/old/testdir/test_increment.vim2
-rw-r--r--test/old/testdir/test_indent.vim6
-rw-r--r--test/old/testdir/test_ins_complete.vim2
-rw-r--r--test/old/testdir/test_map_functions.vim2
-rw-r--r--test/old/testdir/test_method.vim2
-rw-r--r--test/old/testdir/test_popup.vim8
-rw-r--r--test/old/testdir/test_quickfix.vim180
-rw-r--r--test/old/testdir/test_regexp_latin.vim2
-rw-r--r--test/old/testdir/test_scroll_opt.vim14
-rw-r--r--test/old/testdir/test_signals.vim2
-rw-r--r--test/old/testdir/test_signs.vim6
-rw-r--r--test/old/testdir/test_statusline.vim2
-rw-r--r--test/old/testdir/test_substitute.vim2
-rw-r--r--test/old/testdir/test_tagfunc.vim4
-rw-r--r--test/old/testdir/test_tagjump.vim2
-rw-r--r--test/old/testdir/test_timers.vim11
-rw-r--r--test/old/testdir/test_true_false.vim13
-rw-r--r--test/old/testdir/test_utf8.vim4
-rw-r--r--test/old/testdir/test_virtualedit.vim4
-rw-r--r--test/old/testdir/test_visual.vim18
-rw-r--r--test/old/testdir/test_winbuf_close.vim2
32 files changed, 229 insertions, 176 deletions
diff --git a/test/old/testdir/runtest.vim b/test/old/testdir/runtest.vim
index 362964c5cb..e05a78e9ca 100644
--- a/test/old/testdir/runtest.vim
+++ b/test/old/testdir/runtest.vim
@@ -48,8 +48,18 @@
" call add(v:errors, "this happened")
+" Without the +eval feature we can't run these tests, bail out.
+silent! while 0
+ qa!
+silent! endwhile
+
+" In the GUI we can always change the screen size.
+if has('gui_running')
+ set columns=80 lines=25
+endif
+
" Check that the screen size is at least 24 x 80 characters.
-if &lines < 24 || &columns < 80
+if &lines < 24 || &columns < 80
let error = 'Screen size too small! Tests require at least 24 lines with 80 characters, got ' .. &lines .. ' lines with ' .. &columns .. ' characters'
echoerr error
split test.log
diff --git a/test/old/testdir/summarize.vim b/test/old/testdir/summarize.vim
index da5856a2e7..d0d4e00b2c 100644
--- a/test/old/testdir/summarize.vim
+++ b/test/old/testdir/summarize.vim
@@ -33,7 +33,7 @@ if 1
silent %s/^SKIPPED \zs.*/\=Count(submatch(0), 'skipped')/egn
silent %s/^\(\d\+\)\s\+FAILED:/\=Count(submatch(1), 'failed')/egn
- call extend(output, ["Skipped:"])
+ call extend(output, ["Skipped:"])
call extend(output, skipped_output)
call extend(output, [
diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim
index 862c48a1eb..68aa2834d8 100644
--- a/test/old/testdir/test_autocmd.vim
+++ b/test/old/testdir/test_autocmd.vim
@@ -273,8 +273,8 @@ func Test_win_tab_autocmd()
augroup testing
au WinNew * call add(g:record, 'WinNew')
au WinClosed * call add(g:record, 'WinClosed')
- au WinEnter * call add(g:record, 'WinEnter')
- au WinLeave * call add(g:record, 'WinLeave')
+ au WinEnter * call add(g:record, 'WinEnter')
+ au WinLeave * call add(g:record, 'WinLeave')
au TabNew * call add(g:record, 'TabNew')
au TabClosed * call add(g:record, 'TabClosed')
au TabEnter * call add(g:record, 'TabEnter')
@@ -3770,7 +3770,7 @@ endfunc
func Test_autocmd_split_dummy()
" Autocommand trying to split a window containing a dummy buffer.
- auto BufReadPre * exe "sbuf " .. expand("<abuf>")
+ auto BufReadPre * exe "sbuf " .. expand("<abuf>")
" Avoid the "W11" prompt
au FileChangedShell * let v:fcs_choice = 'reload'
func Xautocmd_changelist()
diff --git a/test/old/testdir/test_blob.vim b/test/old/testdir/test_blob.vim
index 25b3c00dfc..3886be48bd 100644
--- a/test/old/testdir/test_blob.vim
+++ b/test/old/testdir/test_blob.vim
@@ -850,7 +850,7 @@ func Test_indexof()
call assert_equal(-1, indexof(v:_null_blob, "v:val == 0xde"))
call assert_equal(-1, indexof(b, v:_null_string))
" Nvim doesn't have null functions
- " call assert_equal(-1, indexof(b, test_null_function()))
+ " call assert_equal(-1, indexof(b, test_null_function()))
let b = 0z01020102
call assert_equal(1, indexof(b, "v:val == 0x02", #{startidx: 0}))
diff --git a/test/old/testdir/test_blockedit.vim b/test/old/testdir/test_blockedit.vim
index e0cfe11af0..c36ff74f29 100644
--- a/test/old/testdir/test_blockedit.vim
+++ b/test/old/testdir/test_blockedit.vim
@@ -53,7 +53,7 @@ func Test_blockinsert_autoindent()
let expected =<< trim END
vim9script
var d = {
- a: (): asdf => 0,
+ a: (): asdf => 0,
b: (): asdf => 0,
c: (): asdf => 0,
}
diff --git a/test/old/testdir/test_codestyle.vim b/test/old/testdir/test_codestyle.vim
index 01dd03f693..a0cebf76d1 100644
--- a/test/old/testdir/test_codestyle.vim
+++ b/test/old/testdir/test_codestyle.vim
@@ -6,6 +6,45 @@ func s:ReportError(fname, lnum, msg)
endif
endfunc
+func Test_test_files()
+ for fname in glob('*.vim', 0, 1)
+ let g:ignoreSwapExists = 'e'
+ exe 'edit ' .. fname
+
+ " some files intentionally have misplaced white space
+ if fname =~ 'test_cindent.vim' || fname =~ 'test_join.vim'
+ continue
+ endif
+
+ " skip files that are known to have a space before a tab
+ if fname !~ 'test_comments.vim'
+ \ && fname !~ 'test_listchars.vim'
+ \ && fname !~ 'test_visual.vim'
+ call cursor(1, 1)
+ let skip = 'getline(".") =~ "codestyle: ignore"'
+ let lnum = search(fname =~ "test_regexp_latin" ? '[^á] \t' : ' \t', 'W', 0, 0, skip)
+ call s:ReportError('testdir/' .. fname, lnum, 'space before Tab')
+ endif
+
+ " skip files that are known to have trailing white space
+ if fname !~ 'test_cmdline.vim'
+ \ && fname !~ 'test_let.vim'
+ \ && fname !~ 'test_tagjump.vim'
+ \ && fname !~ 'test_vim9_cmd.vim'
+ call cursor(1, 1)
+ let lnum = search(
+ \ fname =~ 'test_vim9_assign.vim' ? '[^=]\s$'
+ \ : fname =~ 'test_vim9_class.vim' ? '[^)]\s$'
+ \ : fname =~ 'test_vim9_script.vim' ? '[^,:3]\s$'
+ \ : fname =~ 'test_visual.vim' ? '[^/]\s$'
+ \ : '[^\\]\s$')
+ call s:ReportError('testdir/' .. fname, lnum, 'trailing white space')
+ endif
+ endfor
+
+ bwipe!
+endfunc
+
func Test_help_files()
set nowrapscan
diff --git a/test/old/testdir/test_diffmode.vim b/test/old/testdir/test_diffmode.vim
index 85ee5df961..31d66ebc4a 100644
--- a/test/old/testdir/test_diffmode.vim
+++ b/test/old/testdir/test_diffmode.vim
@@ -1332,12 +1332,12 @@ endfunc
func Test_diff_and_scroll()
" this was causing an ml_get error
set ls=2
- for i in range(winheight(0) * 2)
- call setline(i, i < winheight(0) - 10 ? i : i + 10)
+ for i in range(winheight(0) * 2)
+ call setline(i, i < winheight(0) - 10 ? i : i + 10)
endfor
vnew
- for i in range(winheight(0)*2 + 10)
- call setline(i, i < winheight(0) - 10 ? 0 : i)
+ for i in range(winheight(0)*2 + 10)
+ call setline(i, i < winheight(0) - 10 ? 0 : i)
endfor
diffthis
wincmd p
diff --git a/test/old/testdir/test_edit.vim b/test/old/testdir/test_edit.vim
index 57ff63f26d..d43dcc40c1 100644
--- a/test/old/testdir/test_edit.vim
+++ b/test/old/testdir/test_edit.vim
@@ -2112,7 +2112,7 @@ func Test_edit_overlong_file_name()
file %%%%%%%%%%%%%%%%%%%%%%%%%%
file %%%%%%
set readonly
- set ls=2
+ set ls=2
redraw!
set noreadonly ls&
diff --git a/test/old/testdir/test_expand_func.vim b/test/old/testdir/test_expand_func.vim
index 454d76f0aa..12750baf67 100644
--- a/test/old/testdir/test_expand_func.vim
+++ b/test/old/testdir/test_expand_func.vim
@@ -7,15 +7,15 @@ let s:slnum = str2nr(expand('<slnum>'))
let s:sflnum = str2nr(expand('<sflnum>'))
func s:expand_sfile()
- return expand('<sfile>')
+ return expand('<sfile>')
endfunc
func s:expand_slnum()
- return str2nr(expand('<slnum>'))
+ return str2nr(expand('<slnum>'))
endfunc
func s:expand_sflnum()
- return str2nr(expand('<sflnum>'))
+ return str2nr(expand('<sflnum>'))
endfunc
" This test depends on the location in the test file, put it first.
diff --git a/test/old/testdir/test_fold.vim b/test/old/testdir/test_fold.vim
index b7a0cee444..829cfc674d 100644
--- a/test/old/testdir/test_fold.vim
+++ b/test/old/testdir/test_fold.vim
@@ -499,7 +499,7 @@ func Test_move_folds_around_manual()
%foldopen!
13m7
call Check_foldlevels([1, 2, 2, 2, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 0])
-
+
bw!
endfunc
@@ -748,7 +748,7 @@ func Test_fold_create_marker_in_C()
let content =<< trim [CODE]
/*
* comment
- *
+ *
*
*/
int f(int* p) {
diff --git a/test/old/testdir/test_goto.vim b/test/old/testdir/test_goto.vim
index c5492ff97b..0d5de7235e 100644
--- a/test/old/testdir/test_goto.vim
+++ b/test/old/testdir/test_goto.vim
@@ -17,7 +17,7 @@ endfunc
func Test_gD()
let lines =<< trim [CODE]
int x;
-
+
int func(void)
{
return x;
@@ -30,7 +30,7 @@ endfunc
func Test_gD_too()
let lines =<< trim [CODE]
Filename x;
-
+
int Filename
int func() {
Filename x;
@@ -44,7 +44,7 @@ func Test_gD_comment()
let lines =<< trim [CODE]
/* int x; */
int x;
-
+
int func(void)
{
return x;
@@ -58,7 +58,7 @@ func Test_gD_inline_comment()
let lines =<< trim [CODE]
int y /* , x */;
int x;
-
+
int func(void)
{
return x;
@@ -72,7 +72,7 @@ func Test_gD_string()
let lines =<< trim [CODE]
char *s[] = "x";
int x = 1;
-
+
int func(void)
{
return x;
@@ -85,7 +85,7 @@ endfunc
func Test_gD_string_same_line()
let lines =<< trim [CODE]
char *s[] = "x", int x = 1;
-
+
int func(void)
{
return x;
@@ -99,7 +99,7 @@ func Test_gD_char()
let lines =<< trim [CODE]
char c = 'x';
int x = 1;
-
+
int func(void)
{
return x;
@@ -112,7 +112,7 @@ endfunc
func Test_gd()
let lines =<< trim [CODE]
int x;
-
+
int func(int x)
{
return x;
@@ -146,7 +146,7 @@ func Test_gd_not_local()
{
return x;
}
-
+
int func2(int x)
{
return x;
@@ -173,9 +173,9 @@ func Test_gd_missing_braces()
def func1(a)
a + 1
end
-
+
a = 1
-
+
def func2()
return a
end
@@ -252,11 +252,11 @@ func Test_gd_inline_comment_body()
int func(void)
{
int y /* , x */;
-
+
for (/* int x = 0 */; y < 2; y++);
-
+
int x = 0;
-
+
return x;
}
[CODE]
@@ -292,7 +292,7 @@ func Test_gd_string()
{
char *s = "x";
int x = 1;
-
+
return x;
}
[CODE]
@@ -305,7 +305,7 @@ func Test_gd_string_only()
int func(void)
{
char *s = "x";
-
+
return x;
}
[CODE]
@@ -347,7 +347,7 @@ func Test_gd_local_block()
char *b = "NULL";
return b;
}
-
+
return 0;
}
[CODE]
diff --git a/test/old/testdir/test_increment.vim b/test/old/testdir/test_increment.vim
index cf6334747a..5c61f25103 100644
--- a/test/old/testdir/test_increment.vim
+++ b/test/old/testdir/test_increment.vim
@@ -705,7 +705,7 @@ endfunc
" Text:
" 1 23
" 4 56
-"
+"
" Expected:
" 1) f2 Ctrl-V jl <ctrl-a>, repeat twice afterwards with .
" 1 26
diff --git a/test/old/testdir/test_indent.vim b/test/old/testdir/test_indent.vim
index 3b5b643177..dcacc11663 100644
--- a/test/old/testdir/test_indent.vim
+++ b/test/old/testdir/test_indent.vim
@@ -176,7 +176,7 @@ func Test_modeline_indent_expr()
endfunc
func Test_indent_func_with_gq()
-
+
function GetTeXIndent()
" Sample indent expression for TeX files
let lnum = prevnonblank(v:lnum - 1)
@@ -187,7 +187,7 @@ func Test_indent_func_with_gq()
let line = getline(lnum)
let ind = indent(lnum)
" Add a 'shiftwidth' after beginning of environments.
- if line =~ '\\begin{center}'
+ if line =~ '\\begin{center}'
let ind = ind + shiftwidth()
endif
return ind
@@ -249,7 +249,7 @@ func Test_indent_func_with_gq()
bwipe!
delmark ab
- delfunction GetTeXIndent
+ delfunction GetTeXIndent
endfu
func Test_formatting_keeps_first_line_indent()
diff --git a/test/old/testdir/test_ins_complete.vim b/test/old/testdir/test_ins_complete.vim
index 0f974ebb5b..882e707f63 100644
--- a/test/old/testdir/test_ins_complete.vim
+++ b/test/old/testdir/test_ins_complete.vim
@@ -2382,7 +2382,7 @@ endfunc
func Test_ins_complete_end_of_line()
" this was reading past the end of the line
- new
+ new
norm 8o€ý 
sil! norm o
diff --git a/test/old/testdir/test_map_functions.vim b/test/old/testdir/test_map_functions.vim
index 0898242154..8f7c8bae76 100644
--- a/test/old/testdir/test_map_functions.vim
+++ b/test/old/testdir/test_map_functions.vim
@@ -20,7 +20,7 @@ func Test_maparg()
call assert_equal({'silent': 0, 'noremap': 0, 'script': 0, 'lhs': 'foo<C-V>',
\ 'lhsraw': "foo\x80\xfc\x04V", 'lhsrawalt': "foo\x16",
\ 'mode': ' ', 'nowait': 0, 'expr': 0, 'sid': sid, 'scriptversion': 1,
- \ 'lnum': lnum + 1,
+ \ 'lnum': lnum + 1,
\ 'rhs': 'is<F4>foo', 'buffer': 0, 'abbr': 0, 'mode_bits': 0x47},
\ maparg('foo<C-V>', '', 0, 1))
call assert_equal({'silent': 1, 'noremap': 1, 'script': 1, 'lhs': 'bar',
diff --git a/test/old/testdir/test_method.vim b/test/old/testdir/test_method.vim
index 88dbbd7bf4..0c1d15f4ed 100644
--- a/test/old/testdir/test_method.vim
+++ b/test/old/testdir/test_method.vim
@@ -128,7 +128,7 @@ endfunc
func Test_method_syntax()
eval [1, 2, 3] ->sort( )
- eval [1, 2, 3]
+ eval [1, 2, 3]
\ ->sort(
\ )
call assert_fails('eval [1, 2, 3]-> sort()', 'E15:')
diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim
index 4960041452..20d96a99ea 100644
--- a/test/old/testdir/test_popup.vim
+++ b/test/old/testdir/test_popup.vim
@@ -16,7 +16,7 @@ func ListMonths()
if !empty(entered)
let mth = filter(mth, 'v:val=~"^".entered')
endif
- call complete(1, mth)
+ call complete(1, mth)
return ''
endfunc
@@ -74,7 +74,7 @@ func Test_popup_complete()
call feedkeys("aJu\<f5>\<c-p>l\<c-y>", 'tx')
call assert_equal(["Jul"], getline(1,2))
%d
-
+
" any-non printable, non-white character: Add this character and
" reduce number of matches
call feedkeys("aJu\<f5>\<c-p>l\<c-n>\<c-y>", 'tx')
@@ -96,7 +96,7 @@ func Test_popup_complete()
call feedkeys("aJ\<f5>".repeat("\<c-n>",3)."\<c-l>\<esc>", 'tx')
call assert_equal(["J "], getline(1,2))
%d
-
+
" <c-l> - Insert one character from the current match
call feedkeys("aJ\<f5>".repeat("\<c-n>",4)."\<c-l>\<esc>", 'tx')
call assert_equal(["January "], getline(1,2))
@@ -857,7 +857,7 @@ func Test_popup_position()
call term_sendkeys(buf, "jI123456789_\<Esc>")
call term_sendkeys(buf, "GA\<C-N>")
call VerifyScreenDump(buf, 'Test_popup_position_04', {'rows': 10})
-
+
call term_sendkeys(buf, "\<Esc>u")
call StopVimInTerminal(buf)
call delete('Xtest')
diff --git a/test/old/testdir/test_quickfix.vim b/test/old/testdir/test_quickfix.vim
index 791186efe8..33a33661b7 100644
--- a/test/old/testdir/test_quickfix.vim
+++ b/test/old/testdir/test_quickfix.vim
@@ -1020,52 +1020,50 @@ endfunc
" More tests for 'errorformat'
func Test_efm1()
- if !has('unix')
- " The 'errorformat' setting is different on non-Unix systems.
- " This test works only on Unix-like systems.
- return
- endif
+ " The 'errorformat' setting is different on non-Unix systems.
+ " This test works only on Unix-like systems.
+ CheckUnix
+
+ let l =<< trim [DATA]
+ "Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set.
+ "Xtestfile", line 6 col 19; this is an error
+ gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include version.c
+ Xtestfile:9: parse error before `asd'
+ make: *** [src/vim/testdir/Makefile:100: test_quickfix] Error 1
+ in file "Xtestfile" linenr 10: there is an error
+
+ 2 returned
+ "Xtestfile", line 11 col 1; this is an error
+ "Xtestfile", line 12 col 2; this is another error
+ "Xtestfile", line 14:10; this is an error in column 10
+ =Xtestfile=, line 15:10; this is another error, but in vcol 10 this time
+ "Xtestfile", linenr 16: yet another problem
+ Error in "Xtestfile" at line 17:
+ x should be a dot
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17
+ ^
+ Error in "Xtestfile" at line 18:
+ x should be a dot
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18
+ .............^
+ Error in "Xtestfile" at line 19:
+ x should be a dot
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19
+ --------------^
+ Error in "Xtestfile" at line 20:
+ x should be a dot
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20
+ ^
+
+ Does anyone know what is the problem and how to correction it?
+ "Xtestfile", line 21 col 9: What is the title of the quickfix window?
+ "Xtestfile", line 22 col 9: What is the title of the quickfix window?
+ [DATA]
+
+ call writefile(l, 'Xerrorfile1')
+ call writefile(l[:-2], 'Xerrorfile2')
- let l =<< trim [DATA]
- "Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set.
- "Xtestfile", line 6 col 19; this is an error
- gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include version.c
- Xtestfile:9: parse error before `asd'
- make: *** [src/vim/testdir/Makefile:100: test_quickfix] Error 1
- in file "Xtestfile" linenr 10: there is an error
-
- 2 returned
- "Xtestfile", line 11 col 1; this is an error
- "Xtestfile", line 12 col 2; this is another error
- "Xtestfile", line 14:10; this is an error in column 10
- =Xtestfile=, line 15:10; this is another error, but in vcol 10 this time
- "Xtestfile", linenr 16: yet another problem
- Error in "Xtestfile" at line 17:
- x should be a dot
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17
- ^
- Error in "Xtestfile" at line 18:
- x should be a dot
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18
- .............^
- Error in "Xtestfile" at line 19:
- x should be a dot
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19
- --------------^
- Error in "Xtestfile" at line 20:
- x should be a dot
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20
- ^
-
- Does anyone know what is the problem and how to correction it?
- "Xtestfile", line 21 col 9: What is the title of the quickfix window?
- "Xtestfile", line 22 col 9: What is the title of the quickfix window?
- [DATA]
-
- call writefile(l, 'Xerrorfile1')
- call writefile(l[:-2], 'Xerrorfile2')
-
- let m =<< [DATA]
+ let m =<< [DATA]
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 2
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 3
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 4
@@ -1088,55 +1086,55 @@ func Test_efm1()
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 21
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 22
[DATA]
- call writefile(m, 'Xtestfile')
+ call writefile(m, 'Xtestfile')
- let save_efm = &efm
- set efm+==%f=\\,\ line\ %l%*\\D%v%*[^\ ]\ %m
- set efm^=%AError\ in\ \"%f\"\ at\ line\ %l:,%Z%p^,%C%m
+ let save_efm = &efm
+ set efm+==%f=\\,\ line\ %l%*\\D%v%*[^\ ]\ %m
+ set efm^=%AError\ in\ \"%f\"\ at\ line\ %l:,%Z%p^,%C%m
- exe 'cf Xerrorfile2'
- clast
- copen
- call assert_equal(':cf Xerrorfile2', w:quickfix_title)
- wincmd p
+ exe 'cf Xerrorfile2'
+ clast
+ copen
+ call assert_equal(':cf Xerrorfile2', w:quickfix_title)
+ wincmd p
- exe 'cf Xerrorfile1'
- call assert_equal([4, 12], [line('.'), col('.')])
- cn
- call assert_equal([6, 19], [line('.'), col('.')])
- cn
- call assert_equal([9, 2], [line('.'), col('.')])
- cn
- call assert_equal([10, 2], [line('.'), col('.')])
- cn
- call assert_equal([11, 1], [line('.'), col('.')])
- cn
- call assert_equal([12, 2], [line('.'), col('.')])
- cn
- call assert_equal([14, 10], [line('.'), col('.')])
- cn
- call assert_equal([15, 3, 10], [line('.'), col('.'), virtcol('.')])
- cn
- call assert_equal([16, 2], [line('.'), col('.')])
- cn
- call assert_equal([17, 6], [line('.'), col('.')])
- cn
- call assert_equal([18, 7], [line('.'), col('.')])
- cn
- call assert_equal([19, 8], [line('.'), col('.')])
- cn
- call assert_equal([20, 9], [line('.'), col('.')])
- clast
- cprev
- cprev
- wincmd w
- call assert_equal(':cf Xerrorfile1', w:quickfix_title)
- wincmd p
+ exe 'cf Xerrorfile1'
+ call assert_equal([4, 12], [line('.'), col('.')])
+ cn
+ call assert_equal([6, 19], [line('.'), col('.')])
+ cn
+ call assert_equal([9, 2], [line('.'), col('.')])
+ cn
+ call assert_equal([10, 2], [line('.'), col('.')])
+ cn
+ call assert_equal([11, 1], [line('.'), col('.')])
+ cn
+ call assert_equal([12, 2], [line('.'), col('.')])
+ cn
+ call assert_equal([14, 10], [line('.'), col('.')])
+ cn
+ call assert_equal([15, 3, 10], [line('.'), col('.'), virtcol('.')])
+ cn
+ call assert_equal([16, 2], [line('.'), col('.')])
+ cn
+ call assert_equal([17, 6], [line('.'), col('.')])
+ cn
+ call assert_equal([18, 7], [line('.'), col('.')])
+ cn
+ call assert_equal([19, 8], [line('.'), col('.')])
+ cn
+ call assert_equal([20, 9], [line('.'), col('.')])
+ clast
+ cprev
+ cprev
+ wincmd w
+ call assert_equal(':cf Xerrorfile1', w:quickfix_title)
+ wincmd p
- let &efm = save_efm
- call delete('Xerrorfile1')
- call delete('Xerrorfile2')
- call delete('Xtestfile')
+ let &efm = save_efm
+ call delete('Xerrorfile1')
+ call delete('Xerrorfile2')
+ call delete('Xtestfile')
endfunc
" Test for quickfix directory stack support
@@ -1410,7 +1408,7 @@ func Test_efm2()
failUnlessEqual
raise self.failureException, \\
W:AssertionError: 34 != 33
-
+
--------------------------------------------------------------
Ran 27 tests in 0.063s
[DATA]
diff --git a/test/old/testdir/test_regexp_latin.vim b/test/old/testdir/test_regexp_latin.vim
index 9857e1f886..99a82e8386 100644
--- a/test/old/testdir/test_regexp_latin.vim
+++ b/test/old/testdir/test_regexp_latin.vim
@@ -1164,7 +1164,7 @@ func Test_compare_column_matchstr()
" matchstr().
enew
call setline(1, ['one', 'two', 'three'])
- :3
+ :3
:/ee
bwipe!
set re=1
diff --git a/test/old/testdir/test_scroll_opt.vim b/test/old/testdir/test_scroll_opt.vim
index 76b4089bd1..02e1cc71e4 100644
--- a/test/old/testdir/test_scroll_opt.vim
+++ b/test/old/testdir/test_scroll_opt.vim
@@ -369,18 +369,18 @@ func Test_smoothscroll_wrap_long_line()
call term_sendkeys(buf, ":set scrolloff=1\<CR>")
call term_sendkeys(buf, "10|\<C-E>")
call VerifyScreenDump(buf, 'Test_smooth_long_6', {})
-
+
" 'scrolloff' set to 1, scrolling down, cursor moves screen line up
call term_sendkeys(buf, "\<C-E>")
call term_sendkeys(buf, "gjgj")
call term_sendkeys(buf, "\<C-Y>")
call VerifyScreenDump(buf, 'Test_smooth_long_7', {})
-
+
" 'scrolloff' set to 2, scrolling up, cursor moves screen line down
call term_sendkeys(buf, ":set scrolloff=2\<CR>")
call term_sendkeys(buf, "10|\<C-E>")
call VerifyScreenDump(buf, 'Test_smooth_long_8', {})
-
+
" 'scrolloff' set to 2, scrolling down, cursor moves screen line up
call term_sendkeys(buf, "\<C-E>")
call term_sendkeys(buf, "gj")
@@ -421,7 +421,7 @@ func Test_smoothscroll_wrap_long_line()
call term_sendkeys(buf, "3Gzt")
call term_sendkeys(buf, "\<C-E>j")
call VerifyScreenDump(buf, 'Test_smooth_long_16', {})
-
+
call StopVimInTerminal(buf)
endfunc
@@ -436,7 +436,7 @@ func Test_smoothscroll_one_long_line()
call writefile(lines, 'XSmoothOneLong', 'D')
let buf = RunVimInTerminal('-S XSmoothOneLong', #{rows: 6, cols: 40})
call VerifyScreenDump(buf, 'Test_smooth_one_long_1', {})
-
+
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_smooth_one_long_2', {})
@@ -458,7 +458,7 @@ func Test_smoothscroll_long_line_showbreak()
call writefile(lines, 'XSmoothLongShowbreak', 'D')
let buf = RunVimInTerminal('-S XSmoothLongShowbreak', #{rows: 6, cols: 40})
call VerifyScreenDump(buf, 'Test_smooth_long_showbreak_1', {})
-
+
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_smooth_long_showbreak_2', {})
@@ -648,7 +648,7 @@ func Test_smoothscroll_cursor_scrolloff()
call NewWindow(10, 20)
setl smoothscroll wrap
setl scrolloff=3
-
+
" 120 chars are 6 screen lines
call setline(1, "abcdefghijklmnopqrstABCDEFGHIJKLMNOPQRSTabcdefghijklmnopqrstABCDEFGHIJKLMNOPQRSTabcdefghijklmnopqrstABCDEFGHIJKLMNOPQRST")
call setline(2, "below")
diff --git a/test/old/testdir/test_signals.vim b/test/old/testdir/test_signals.vim
index af4847e42c..4d4c7e405f 100644
--- a/