mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-03 17:24:29 +00:00 
			
		
		
		
	vim-patch:9.1.1693: tests: test_filetype fails in shadow dir
Problem:  tests: test_filetype fails in shadow dir
          (after v9.1.9.1.1687)
Solution: Use a custom test that does not rely on configure.ac
          being existing in the upper directory tree.
de6e560150
Co-authored-by: Christian Brabandt <cb@256bit.org>
			
			
This commit is contained in:
		@@ -191,7 +191,7 @@ func s:GetFilenameChecks() abort
 | 
				
			|||||||
    \ 'coco': ['file.atg'],
 | 
					    \ 'coco': ['file.atg'],
 | 
				
			||||||
    \ 'conaryrecipe': ['file.recipe'],
 | 
					    \ 'conaryrecipe': ['file.recipe'],
 | 
				
			||||||
    \ 'conf': ['auto.master', 'file.conf', 'texdoc.cnf', '.x11vncrc', '.chktexrc', '.ripgreprc', 'ripgreprc', 'file.ctags'],
 | 
					    \ 'conf': ['auto.master', 'file.conf', 'texdoc.cnf', '.x11vncrc', '.chktexrc', '.ripgreprc', 'ripgreprc', 'file.ctags'],
 | 
				
			||||||
    \ 'config': ['/etc/hostname.file', 'any/etc/hostname.file', 'configure.in', 'configure.ac', 'alocal.m4', 'file.at'],
 | 
					    \ 'config': ['/etc/hostname.file', 'any/etc/hostname.file', 'configure.in', 'configure.ac', 'file.at'],
 | 
				
			||||||
    \ 'confini': ['pacman.conf', 'paru.conf', 'mpv.conf', 'any/.aws/config', 'any/.aws/credentials', 'file.nmconnection',
 | 
					    \ 'confini': ['pacman.conf', 'paru.conf', 'mpv.conf', 'any/.aws/config', 'any/.aws/credentials', 'file.nmconnection',
 | 
				
			||||||
    \             'any/.gnuradio/grc.conf', 'any/gnuradio/config.conf', 'any/gnuradio/conf.d/modtool.conf'],
 | 
					    \             'any/.gnuradio/grc.conf', 'any/gnuradio/config.conf', 'any/gnuradio/conf.d/modtool.conf'],
 | 
				
			||||||
    \ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'],
 | 
					    \ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'],
 | 
				
			||||||
@@ -3113,4 +3113,23 @@ func Test_diff_format()
 | 
				
			|||||||
  filetype off
 | 
					  filetype off
 | 
				
			||||||
endfunc
 | 
					endfunc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func Test_m4_format()
 | 
				
			||||||
 | 
					  filetype on
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  call mkdir('Xm4', 'D')
 | 
				
			||||||
 | 
					  cd Xm4
 | 
				
			||||||
 | 
					  call writefile([''], 'alocal.m4', 'D')
 | 
				
			||||||
 | 
					  split alocal.m4
 | 
				
			||||||
 | 
					  call assert_equal('m4', &filetype)
 | 
				
			||||||
 | 
					  bwipe!
 | 
				
			||||||
 | 
					  " an accompanying configure.ac in the current directory changes the filetype
 | 
				
			||||||
 | 
					  call writefile([''], 'configure.ac')
 | 
				
			||||||
 | 
					  split alocal.m4
 | 
				
			||||||
 | 
					  call assert_equal('config', &filetype)
 | 
				
			||||||
 | 
					  bwipe!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  cd -
 | 
				
			||||||
 | 
					  filetype off
 | 
				
			||||||
 | 
					endfunc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" vim: shiftwidth=2 sts=2 expandtab
 | 
					" vim: shiftwidth=2 sts=2 expandtab
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user