diff src/testdir/test_tagjump.vim @ 18640:b9240fe40dd4 v8.1.2312

patch 8.1.2312: "line:" field in tags file not used Commit: https://github.com/vim/vim/commit/077b9dd3541339a23ade0cc6a23e804ee39312c5 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 17 16:18:31 2019 +0100 patch 8.1.2312: "line:" field in tags file not used Problem: "line:" field in tags file not used. Solution: Recognize the field and use the value. (Andy Massimino, Daniel Hahler, closes #5232, closes #2546, closes #1057)
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Nov 2019 16:30:03 +0100
parents 90e5812af76b
children 068337e86133
line wrap: on
line diff
--- a/src/testdir/test_tagjump.vim
+++ b/src/testdir/test_tagjump.vim
@@ -526,4 +526,28 @@ func Test_tselect()
   call delete('XTest_tselect')
 endfunc
 
+func Test_tagline()
+  call writefile([
+	\ 'provision	Xtest.py	/^    def provision(self, **kwargs):$/;"	m	line:1	language:Python class:Foo',
+	\ 'provision	Xtest.py	/^    def provision(self, **kwargs):$/;"	m	line:3	language:Python class:Bar',
+	\], 'Xtags')
+  call writefile([
+	\ '    def provision(self, **kwargs):',
+	\ '        pass',
+	\ '    def provision(self, **kwargs):',
+	\ '        pass',
+	\], 'Xtest.py')
+
+  set tags=Xtags
+
+  1tag provision
+  call assert_equal(line('.'), 1)
+  2tag provision
+  call assert_equal(line('.'), 3)
+
+  call delete('Xtags')
+  call delete('Xtest.py')
+  set tags&
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab