• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Révisionfd205e78e163f388e6cd4cbba062c4f2c04b2fb5 (tree)
l'heure2021-06-20 23:45:03
AuteurBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Message de Log

patch 8.2.3025: not enough tests for quickfix end_col and end_lnum

Commit: https://github.com/vim/vim/commit/0d5e1ec37fbe75e18acba6f650c59bf91063108c
Author: shane.xb.qian <shane.qian@foxmail.com>
Date: Sun Jun 20 16:31:00 2021 +0200

patch 8.2.3025: not enough tests for quickfix end_col and end_lnum
Problem: Not enough tests for quickfix end_col and end_lnum.
Solution: Add a few more test cases. (Shane-XB-Qian, closes https://github.com/vim/vim/issues/8409)

Change Summary

Modification

diff -r acf2c62bee13 -r fd205e78e163 src/testdir/test_quickfix.vim
--- a/src/testdir/test_quickfix.vim Sun Jun 20 15:15:05 2021 +0200
+++ b/src/testdir/test_quickfix.vim Sun Jun 20 16:45:03 2021 +0200
@@ -5366,7 +5366,42 @@
53665366 call setqflist(['bb'], 'a')
53675367 call assert_equal(1, line('$'))
53685368 call assert_equal(['Xfile1|10| aa'], getline(1, '$'))
5369- call assert_equal([{'lnum': 10, 'end_lnum': 0, 'bufnr': bufnr('Xfile1'), 'col': 0, 'end_col': 0, 'pattern': '', 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'module': '', 'text': 'aa'}], getqflist())
5369+ call assert_equal([{'lnum': 10 , 'end_lnum': 0 , 'bufnr': bufnr('Xfile1') , 'col': 0 , 'end_col': 0 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , getqflist())
5370+
5371+ call setqflist([{'lnum': 10 , 'bufnr': bufnr('Xfile1') , 'col': 0 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , 'r')
5372+ call assert_equal(1 , line('$'))
5373+ call assert_equal(['Xfile1|10| aa'] , getline(1 , '$'))
5374+ call assert_equal([{'lnum': 10 , 'end_lnum': 0 , 'bufnr': bufnr('Xfile1') , 'col': 0 , 'end_col': 0 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , getqflist())
5375+
5376+ call setqflist([{'lnum': 10 , 'end_lnum': 0 , 'bufnr': bufnr('Xfile1') , 'col': 0 , 'end_col': 0 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , 'r')
5377+ call assert_equal(1 , line('$'))
5378+ call assert_equal(['Xfile1|10| aa'] , getline(1 , '$'))
5379+ call assert_equal([{'lnum': 10 , 'end_lnum': 0 , 'bufnr': bufnr('Xfile1') , 'col': 0 , 'end_col': 0 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , getqflist())
5380+
5381+ call setqflist([{'lnum': 10 , 'end_lnum': -123 , 'bufnr': bufnr('Xfile1') , 'col': 0 , 'end_col': -456 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , 'r')
5382+ call assert_equal(1 , line('$'))
5383+ call assert_equal(['Xfile1|10| aa'] , getline(1 , '$'))
5384+ call assert_equal([{'lnum': 10 , 'end_lnum': -123 , 'bufnr': bufnr('Xfile1') , 'col': 0 , 'end_col': -456 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , getqflist())
5385+
5386+ call setqflist([{'lnum': 10 , 'end_lnum': -123 , 'bufnr': bufnr('Xfile1') , 'col': 666 , 'end_col': 0 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , 'r')
5387+ call assert_equal(1 , line('$'))
5388+ call assert_equal(['Xfile1|10 col 666| aa'] , getline(1 , '$'))
5389+ call assert_equal([{'lnum': 10 , 'end_lnum': -123 , 'bufnr': bufnr('Xfile1') , 'col': 666 , 'end_col': 0 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , getqflist())
5390+
5391+ call setqflist([{'lnum': 10 , 'end_lnum': -123 , 'bufnr': bufnr('Xfile1') , 'col': 666 , 'end_col': -456 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , 'r')
5392+ call assert_equal(1 , line('$'))
5393+ call assert_equal(['Xfile1|10 col 666| aa'] , getline(1 , '$'))
5394+ call assert_equal([{'lnum': 10 , 'end_lnum': -123 , 'bufnr': bufnr('Xfile1') , 'col': 666 , 'end_col': -456 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , getqflist())
5395+
5396+ call setqflist([{'lnum': 10 , 'end_lnum': -123 , 'bufnr': bufnr('Xfile1') , 'col': 666 , 'end_col': 222 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , 'r')
5397+ call assert_equal(1 , line('$'))
5398+ call assert_equal(['Xfile1|10 col 666-222| aa'] , getline(1 , '$'))
5399+ call assert_equal([{'lnum': 10 , 'end_lnum': -123 , 'bufnr': bufnr('Xfile1') , 'col': 666 , 'end_col': 222 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , getqflist())
5400+
5401+ call setqflist([{'lnum': 10 , 'end_lnum': 6 , 'bufnr': bufnr('Xfile1') , 'col': 666 , 'end_col': 222 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , 'r')
5402+ call assert_equal(1 , line('$'))
5403+ call assert_equal(['Xfile1|10-6 col 666-222| aa'] , getline(1 , '$'))
5404+ call assert_equal([{'lnum': 10 , 'end_lnum': 6 , 'bufnr': bufnr('Xfile1') , 'col': 666 , 'end_col': 222 , 'pattern': '' , 'valid': 1 , 'vcol': 0 , 'nr': -1 , 'type': '' , 'module': '' , 'text': 'aa'}] , getqflist())
53705405 cclose
53715406 endfunc
53725407
diff -r acf2c62bee13 -r fd205e78e163 src/version.c
--- a/src/version.c Sun Jun 20 15:15:05 2021 +0200
+++ b/src/version.c Sun Jun 20 16:45:03 2021 +0200
@@ -756,6 +756,8 @@
756756 static int included_patches[] =
757757 { /* Add new patch number below this line */
758758 /**/
759+ 3025,
760+/**/
759761 3024,
760762 /**/
761763 3023,
Afficher sur ancien navigateur de dépôt.