aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2021-10-10 20:57:09 +0200
committerGitHub <noreply@github.com>2021-10-10 20:57:09 +0200
commit62eec98d5feee9173ea2decb2d7cb72971c24f8b (patch)
treee12b9acc1100a0c235cbaf8383107b651b3787bc
parent45fa70adcb165a94d0dd3af0591b48d0d0da29dd (diff)
downloadrneovim-62eec98d5feee9173ea2decb2d7cb72971c24f8b.tar.gz
rneovim-62eec98d5feee9173ea2decb2d7cb72971c24f8b.tar.bz2
rneovim-62eec98d5feee9173ea2decb2d7cb72971c24f8b.zip
vim-patch:8.2.3491: xpm2 filetype dection is not so good (#15982)
Problem: xpm2 filetype dection is not so good. Solution: Adjust the check for xpm2. (closes vim/vim#8914) https://github.com/vim/vim/commit/6e77b88df6371356cce9d6e08daf0f7cb1e7878a
-rw-r--r--src/nvim/testdir/test_filetype.vim15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
index cca89cbd6d..52e6ba64cc 100644
--- a/src/nvim/testdir/test_filetype.vim
+++ b/src/nvim/testdir/test_filetype.vim
@@ -554,6 +554,7 @@ let s:filename_checks = {
\ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu'],
\ 'xmodmap': ['anyXmodmap', 'Xmodmap', 'some-Xmodmap', 'some-xmodmap', 'some-xmodmap-file', 'xmodmap', 'xmodmap-file'],
\ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
+ \ 'xpm': ['file.xpm'],
\ 'xpm2': ['file.xpm2'],
\ 'xquery': ['file.xq', 'file.xql', 'file.xqm', 'file.xquery', 'file.xqy'],
\ 'xs': ['file.xs'],
@@ -568,7 +569,6 @@ let s:filename_checks = {
\ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh', '.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc', '.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file', 'any/etc/zprofile', 'zlog', 'zlog-file', 'zsh', 'zsh-file'],
\
\ 'help': [$VIMRUNTIME . '/doc/help.txt'],
- \ 'xpm': ['file.xpm'],
\ }
let s:filename_case_checks = {
@@ -918,4 +918,17 @@ func Test_m_file()
call delete('Xfile.m')
filetype off
endfunc
+
+func Test_xpm_file()
+ filetype on
+
+ call writefile(['this is XPM2'], 'file.xpm')
+ split file.xpm
+ call assert_equal('xpm2', &filetype)
+ bwipe!
+
+ call delete('file.xpm')
+ filetype off
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab