diff src/testdir/test_tagjump.vim @ 28027:d59552ad3f36 v8.2.4538

patch 8.2.4538: the find_tags_in_file() function is too long Commit: https://github.com/vim/vim/commit/bf40e90dfeb1d3d0280077e65782beb3fee31c9f Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Thu Mar 10 18:36:54 2022 +0000 patch 8.2.4538: the find_tags_in_file() function is too long Problem: The find_tags_in_file() function is too long. Solution: Refactor into smaller functions. (Yegappan Lakshmanan, closes #9920)
author Bram Moolenaar <Bram@vim.org>
date Thu, 10 Mar 2022 19:45:02 +0100
parents c724906134a3
children 12a256140887
line wrap: on
line diff
--- a/src/testdir/test_tagjump.vim
+++ b/src/testdir/test_tagjump.vim
@@ -811,11 +811,11 @@ endfunc
 
 " Test for an unsorted tags file
 func Test_tag_sort()
-  call writefile([
+  let l = [
         \ "first\tXfoo\t1",
         \ "ten\tXfoo\t3",
-        \ "six\tXfoo\t2"],
-        \ 'Xtags')
+        \ "six\tXfoo\t2"]
+  call writefile(l, 'Xtags')
   set tags=Xtags
   let code =<< trim [CODE]
     int first() {}
@@ -826,7 +826,14 @@ func Test_tag_sort()
 
   call assert_fails('tag first', 'E432:')
 
+  " When multiple tag files are not sorted, then message should be displayed
+  " multiple times
+  call writefile(l, 'Xtags2')
+  set tags=Xtags,Xtags2
+  call assert_fails('tag first', ['E432:', 'E432:'])
+
   call delete('Xtags')
+  call delete('Xtags2')
   call delete('Xfoo')
   set tags&
   %bwipe