]> granicus.if.org Git - vim/commitdiff
patch 7.4.1614 v7.4.1614
authorBram Moolenaar <Bram@vim.org>
Sat, 19 Mar 2016 21:54:09 +0000 (22:54 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 19 Mar 2016 21:54:09 +0000 (22:54 +0100)
Problem:    Still quickfix test in old style.
Solution:   Turn test 10 into a new style test.

src/testdir/Make_all.mak
src/testdir/Make_vms.mms
src/testdir/main.aap
src/testdir/test10.in [deleted file]
src/testdir/test10.ok [deleted file]
src/testdir/test10a.in [deleted file]
src/testdir/test10a.ok [deleted file]
src/testdir/test_quickfix.vim
src/version.c

index c41da39df680f7226c9d7ca9cc4f1f02d77d78a6..455ca7b61cca8ca26842838dc9556c05889d671d 100644 (file)
@@ -130,7 +130,6 @@ SCRIPTS_MORE1 = \
 # Tests that run on most systems, but not on Amiga and DOS/Windows.
 SCRIPTS_MORE2 = \
        test2.out \
-       test10.out \
        test12.out \
        test13.out \
        test25.out \
index 77b172b54e125b2174ce9430ab1d9c66fc890e4a..ca4fceebd6f1239fec0703e0bed757f58bc8977b 100644 (file)
@@ -109,7 +109,7 @@ GUI_OPTION = -g
 .ENDIF
 
 .IFDEF WANT_UNIX
-SCRIPT_UNIX = test10.out test12.out test17.out test25.out test27.out test49.out test73.out
+SCRIPT_UNIX = test12.out test17.out test25.out test27.out test49.out test73.out
 .ENDIF
 
 .IFDEF WANT_WIN
index ef2d93cacb73086775a1fc9cad1b99f2b539b60f..4e07f24a7ea003aa0b2eb2770eb35dcfe011708e 100644 (file)
@@ -5,7 +5,7 @@
 VimProg ?= ../vim
 
 Scripts = test1.out test2.out test3.out test4.out test5.out test6.out
-               test7.out test8.out test9.out test10.out test11.out
+               test7.out test8.out test9.out test11.out
                test12.out  test13.out test14.out test15.out test17.out
                test18.out test19.out test20.out test21.out test22.out
                test23.out test24.out test25.out test26.out test27.out
diff --git a/src/testdir/test10.in b/src/testdir/test10.in
deleted file mode 100644 (file)
index 2d0d546..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-Test for 'errorformat'.  This will fail if the quickfix feature was disabled.
-
-STARTTEST
-:so small.vim
-:" Also test a BOM is ignored.
-:so mbyte.vim
-:set encoding=utf-8
-:7/start of errorfile/,/end of errorfile/w! Xerrorfile1
-:7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2
-:/start of testfile/,/end of testfile/w! Xtestfile
-:set efm+==%f=\\,\ line\ %l%*\\D%v%*[^\ ]\ %m
-:set efm^=%AError\ in\ \"%f\"\ at\ line\ %l:,%Z%p^,%C%m
-:cf Xerrorfile2
-:clast
-:copen
-:let a=w:quickfix_title
-:wincmd p
-lgR\12=a\r\e
-:cf Xerrorfile1
-grA
-:cn
-gRLINE 6, COL 19\e
-:cn
-gRNO COLUMN SPECIFIED\e
-:cn
-gRAGAIN NO COLUMN\e
-:cn
-gRCOL 1\e
-:cn
-gRCOL 2\e
-:cn
-gRCOL 10\e
-:cn
-gRVCOL 10\e
-:cn
-grI
-:cn
-gR. SPACE POINTER\e
-:cn
-gR. DOT POINTER\e
-:cn
-gR. DASH POINTER\e
-:cn
-gR. TAB-SPACE POINTER\e
-:clast
-:cprev
-:cprev
-:wincmd w
-:let a=w:quickfix_title
-:wincmd p
-lgR\12=a\r\e
-:w! test.out             " Write contents of this file
-:qa!
-ENDTEST
-
-start of errorfile
-"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: *** [vim] 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?
-end of errorfile
-
-start of testfile
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  2
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  3
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  4
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  5
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  6
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  7
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  8
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  9
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 10
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 11
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 12
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 13
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 14
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 15
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 16
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 17
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 18
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 19
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 20
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 21
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 22
-end of testfile
diff --git a/src/testdir/test10.ok b/src/testdir/test10.ok
deleted file mode 100644 (file)
index 76a02f4..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-start of testfile
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  2
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  3
-       xxxxxxxxxxAxxxxxxxxxxxxxxxxxxx    line  4
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  5
-       xxxxxxxxxxxxxxxxxLINE 6, COL 19   line  6
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  7
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  8
-       NO COLUMN SPECIFIEDxxxxxxxxxxx    line  9
-       AGAIN NO COLUMNxxxxxxxxxxxxxxx    line 10
-COL 1  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 11
-       COL 2xxxxxxxxxxxxxxxxxxxxxxxxx    line 12
-       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 13
-       xxxxxxxxCOL 10xxxxxxxxxxxxxxxx    line 14
-       xVCOL 10xxxxxxxxxxxxxxxxxxxxxx    line 15
-       Ixxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 16
-       xxxx. SPACE POINTERxxxxxxxxxxx    line 17
-       xxxxx. DOT POINTERxxxxxxxxxxxx    line 18
-       xxxxxx. DASH POINTERxxxxxxxxxx    line 19
-       xxxxxxx. TAB-SPACE POINTERxxxx    line 20
-       xxxxxxxx:cf Xerrorfile1xxxxxxx    line 21
-       xxxxxxxx:cf Xerrorfile2xxxxxxx    line 22
-end of testfile
diff --git a/src/testdir/test10a.in b/src/testdir/test10a.in
deleted file mode 100644 (file)
index 19e8652..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-Test for 'errorformat'.
-
-STARTTEST
-:so small.vim
-:/start of errorfile/,/end of errorfile/w! Xerrorfile
-:/start of testfile/,/end of testfile/w! Xtestfile
-:cf Xerrorfile
-rA
-:cn
-rB
-:cn
-rC
-:cn
-rD
-:cn
-rE
-:w! test.out             " Write contents of this file
-:qa!
-ENDTEST
-
-start of errorfile
-
-                  printf(" %d \n", (number/other)%10 );
-..................^
-%CC-E-NOSEMI, Missing ";".
-at line number 4 in file SYS$DISK:XTESTFILE
-
-             other=10000000;
-.............^
-%CC-E-UNDECLARED, In this statement, "oszt" is not declared.
-at line number 7 in file SYS$DISK:XTESTFILE
-
-             for (i = 0; i<7 ; i++ ){
-..................^
-%CC-E-UNDECLARED, In this statement, "i" is not declared.
-at line number 16 in file SYS$DISK:XTESTFILE
-
-some other error somewhere here.
-...........................^
-%CC-W-WARRING, Sorry, but no expalnation for such an warring.
-at line number 19 in file SYS$DISK:XTESTFILE
-
-and finally some other error exactly here.
-.....................................^
-%CC-I-INFORMATIONAL, It should be some informational message.
-at line number 20 in file SYS$DISK:XTESTFILE
-
-Does anyone know what is the problem and how to correct ??  :)
-end of errorfile
-
-start of testfile
-01234567890123456789012345678901234567
-line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 4  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 6  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 7  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 8  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 16 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-end of testfile
diff --git a/src/testdir/test10a.ok b/src/testdir/test10a.ok
deleted file mode 100644 (file)
index 10e78c9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-start of testfile
-01234567890123456789012345678901234567
-line 3  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 4  xxxxxxxxxxAxxxxxxxxxxxxxxxxxxx
-line 5  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 6  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 7  xxxxxBxxxxxxxxxxxxxxxxxxxxxxxx
-line 8  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 9  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 11 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 12 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 16 xxxxxxxxxxCxxxxxxxxxxxxxxxxxxx
-line 17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 19 xxxxxxxxxxxxxxxxxxxDxxxxxxxxxx
-line 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxE
-line 21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-line 22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-end of testfile
index 22a7e673247aea211631d2ed4e49feea1fef800c..07c465d8d3896723a9ec3e81a2f803a4d01552ae 100644 (file)
@@ -4,6 +4,8 @@ if !has('quickfix')
   finish
 endif
 
+set encoding=utf-8
+
 " Tests for the :clist and :llist commands
 function XlistTests(cchar)
   let Xlist = a:cchar . 'list'
@@ -514,3 +516,124 @@ function Test_locationlist_curwin_was_closed()
 
     augroup! testgroup
 endfunction
+
+" More tests for 'errorformat'
+function! Test_efm1()
+    if !has('unix')
+       " The 'errorformat' setting is different on non-Unix systems.
+       " This test works only on Unix-like systems.
+       return
+    endif
+
+    let l = [
+      \ '"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: *** [vim] 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?'
+      \ ]
+
+    call writefile(l, 'Xerrorfile1')
+    call writefile(l[:-2], 'Xerrorfile2')
+
+    let m = [
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  2',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  3',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  4',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  5',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  6',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  7',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  8',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line  9',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 10',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 11',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 12',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 13',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 14',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 15',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 16',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 17',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 18',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 19',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 20',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 21',
+       \ '     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx    line 22'
+       \ ]
+    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
+
+    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
+
+    let &efm = save_efm
+    call delete('Xerrorfile1')
+    call delete('Xerrorfile2')
+    call delete('Xtestfile')
+endfunction
index feedb8d2104c47c07c084582c314c3e6ef41e0f2..e7db1e53520f8e36bb3cb3f60b7aadf82aa35f11 100644 (file)
@@ -748,6 +748,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1614,
 /**/
     1613,
 /**/