Skip to content

Commit 7eba3d2

Browse files
committed
patch 7.4.1614
Problem: Still quickfix test in old style. Solution: Turn test 10 into a new style test.
1 parent 064154c commit 7eba3d2

9 files changed

Lines changed: 127 additions & 236 deletions

File tree

src/testdir/Make_all.mak

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ SCRIPTS_MORE1 = \
130130
# Tests that run on most systems, but not on Amiga and DOS/Windows.
131131
SCRIPTS_MORE2 = \
132132
test2.out \
133-
test10.out \
134133
test12.out \
135134
test13.out \
136135
test25.out \

src/testdir/Make_vms.mms

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ GUI_OPTION = -g
109109
.ENDIF
110110

111111
.IFDEF WANT_UNIX
112-
SCRIPT_UNIX = test10.out test12.out test17.out test25.out test27.out test49.out test73.out
112+
SCRIPT_UNIX = test12.out test17.out test25.out test27.out test49.out test73.out
113113
.ENDIF
114114

115115
.IFDEF WANT_WIN

src/testdir/main.aap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
VimProg ?= ../vim
66

77
Scripts = test1.out test2.out test3.out test4.out test5.out test6.out
8-
test7.out test8.out test9.out test10.out test11.out
8+
test7.out test8.out test9.out test11.out
99
test12.out test13.out test14.out test15.out test17.out
1010
test18.out test19.out test20.out test21.out test22.out
1111
test23.out test24.out test25.out test26.out test27.out

src/testdir/test10.in

Lines changed: 0 additions & 114 deletions
This file was deleted.

src/testdir/test10.ok

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/testdir/test10a.in

Lines changed: 0 additions & 73 deletions
This file was deleted.

src/testdir/test10a.ok

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/testdir/test_quickfix.vim

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ if !has('quickfix')
44
finish
55
endif
66

7+
set encoding=utf-8
8+
79
" Tests for the :clist and :llist commands
810
function XlistTests(cchar)
911
let Xlist = a:cchar . 'list'
@@ -514,3 +516,124 @@ function Test_locationlist_curwin_was_closed()
514516

515517
augroup! testgroup
516518
endfunction
519+
520+
" More tests for 'errorformat'
521+
function! Test_efm1()
522+
if !has('unix')
523+
" The 'errorformat' setting is different on non-Unix systems.
524+
" This test works only on Unix-like systems.
525+
return
526+
endif
527+
528+
let l = [
529+
\ '"Xtestfile", line 4.12: 1506-045 (S) Undeclared identifier fd_set.',
530+
\ '"Xtestfile", line 6 col 19; this is an error',
531+
\ 'gcc -c -DHAVE_CONFIsing-prototypes -I/usr/X11R6/include version.c',
532+
\ 'Xtestfile:9: parse error before `asd''',
533+
\ 'make: *** [vim] Error 1',
534+
\ 'in file "Xtestfile" linenr 10: there is an error',
535+
\ '',
536+
\ '2 returned',
537+
\ '"Xtestfile", line 11 col 1; this is an error',
538+
\ '"Xtestfile", line 12 col 2; this is another error',
539+
\ '"Xtestfile", line 14:10; this is an error in column 10',
540+
\ '=Xtestfile=, line 15:10; this is another error, but in vcol 10 this time',
541+
\ '"Xtestfile", linenr 16: yet another problem',
542+
\ 'Error in "Xtestfile" at line 17:',
543+
\ 'x should be a dot',
544+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17',
545+
\ ' ^',
546+
\ 'Error in "Xtestfile" at line 18:',
547+
\ 'x should be a dot',
548+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18',
549+
\ '.............^',
550+
\ 'Error in "Xtestfile" at line 19:',
551+
\ 'x should be a dot',
552+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19',
553+
\ '--------------^',
554+
\ 'Error in "Xtestfile" at line 20:',
555+
\ 'x should be a dot',
556+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20',
557+
\ ' ^',
558+
\ '',
559+
\ 'Does anyone know what is the problem and how to correction it?',
560+
\ '"Xtestfile", line 21 col 9: What is the title of the quickfix window?',
561+
\ '"Xtestfile", line 22 col 9: What is the title of the quickfix window?'
562+
\ ]
563+
564+
call writefile(l, 'Xerrorfile1')
565+
call writefile(l[:-2], 'Xerrorfile2')
566+
567+
let m = [
568+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 2',
569+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 3',
570+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 4',
571+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 5',
572+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 6',
573+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 7',
574+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 8',
575+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 9',
576+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 10',
577+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 11',
578+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 12',
579+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 13',
580+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 14',
581+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 15',
582+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 16',
583+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 17',
584+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 18',
585+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 19',
586+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 20',
587+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 21',
588+
\ ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx line 22'
589+
\ ]
590+
call writefile(m, 'Xtestfile')
591+
592+
let save_efm = &efm
593+
set efm+==%f=\\,\ line\ %l%*\\D%v%*[^\ ]\ %m
594+
set efm^=%AError\ in\ \"%f\"\ at\ line\ %l:,%Z%p^,%C%m
595+
596+
exe 'cf Xerrorfile2'
597+
clast
598+
copen
599+
call assert_equal(':cf Xerrorfile2', w:quickfix_title)
600+
wincmd p
601+
602+
exe 'cf Xerrorfile1'
603+
call assert_equal([4, 12], [line('.'), col('.')])
604+
cn
605+
call assert_equal([6, 19], [line('.'), col('.')])
606+
cn
607+
call assert_equal([9, 2], [line('.'), col('.')])
608+
cn
609+
call assert_equal([10, 2], [line('.'), col('.')])
610+
cn
611+
call assert_equal([11, 1], [line('.'), col('.')])
612+
cn
613+
call assert_equal([12, 2], [line('.'), col('.')])
614+
cn
615+
call assert_equal([14, 10], [line('.'), col('.')])
616+
cn
617+
call assert_equal([15, 3, 10], [line('.'), col('.'), virtcol('.')])
618+
cn
619+
call assert_equal([16, 2], [line('.'), col('.')])
620+
cn
621+
call assert_equal([17, 6], [line('.'), col('.')])
622+
cn
623+
call assert_equal([18, 7], [line('.'), col('.')])
624+
cn
625+
call assert_equal([19, 8], [line('.'), col('.')])
626+
cn
627+
call assert_equal([20, 9], [line('.'), col('.')])
628+
clast
629+
cprev
630+
cprev
631+
wincmd w
632+
call assert_equal(':cf Xerrorfile1', w:quickfix_title)
633+
wincmd p
634+
635+
let &efm = save_efm
636+
call delete('Xerrorfile1')
637+
call delete('Xerrorfile2')
638+
call delete('Xtestfile')
639+
endfunction

0 commit comments

Comments
 (0)