diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_filetype.vim | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index b45895d608..f197039ec5 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -633,6 +633,7 @@ func s:GetFilenameChecks() abort \ 'swayconfig': ['/home/user/.sway/config', '/home/user/.config/sway/config', '/etc/sway/config', '/etc/xdg/sway/config'], \ 'swift': ['file.swift'], \ 'swiftgyb': ['file.swift.gyb'], + \ 'swig': ['file.swg', 'file.swig'], \ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf', 'any/etc/sysctl.conf', 'any/etc/sysctl.d/file.conf'], \ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.dnssd', 'any/systemd/file.link', 'any/systemd/file.mount', 'any/systemd/file.netdev', 'any/systemd/file.network', 'any/systemd/file.nspawn', 'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.slice', 'any/systemd/file.socket', 'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer', '/etc/systemd/some.conf.d/file.conf', '/etc/systemd/system/some.d/file.conf', '/etc/systemd/system/some.d/.#file', '/etc/systemd/system/.#otherfile', '/home/user/.config/systemd/user/some.d/mine.conf', '/home/user/.config/systemd/user/some.d/.#file', '/home/user/.config/systemd/user/.#otherfile', '/.config/systemd/user/.#', '/.config/systemd/user/.#-file', '/.config/systemd/user/file.d/.#', '/.config/systemd/user/file.d/.#-file', '/.config/systemd/user/file.d/file.conf', '/etc/systemd/file.conf.d/file.conf', '/etc/systemd/system/.#', '/etc/systemd/system/.#-file', '/etc/systemd/system/file.d/.#', '/etc/systemd/system/file.d/.#-file', '/etc/systemd/system/file.d/file.conf', '/systemd/file.automount', '/systemd/file.dnssd', '/systemd/file.link', '/systemd/file.mount', '/systemd/file.netdev', '/systemd/file.network', '/systemd/file.nspawn', '/systemd/file.path', '/systemd/file.service', '/systemd/file.slice', '/systemd/file.socket', '/systemd/file.swap', '/systemd/file.target', '/systemd/file.timer', 'any/.config/systemd/user/.#', 'any/.config/systemd/user/.#-file', 'any/.config/systemd/user/file.d/.#', 'any/.config/systemd/user/file.d/.#-file', 'any/.config/systemd/user/file.d/file.conf', 'any/etc/systemd/file.conf.d/file.conf', 'any/etc/systemd/system/.#', 'any/etc/systemd/system/.#-file', 'any/etc/systemd/system/file.d/.#', 'any/etc/systemd/system/file.d/.#-file', 'any/etc/systemd/system/file.d/file.conf'], \ 'systemverilog': ['file.sv', 'file.svh'], @@ -2248,4 +2249,34 @@ func Test_vba_file() filetype off endfunc +func Test_i_file() + filetype on + + " Swig: keyword + call writefile(['%module mymodule', '/* a comment */'], 'Xfile.i', 'D') + split Xfile.i + call assert_equal('swig', &filetype) + bwipe! + + " Swig: verbatim block + call writefile(['%{', '#include <header.hpp>', '%}'], 'Xfile.i', 'D') + split Xfile.i + call assert_equal('swig', &filetype) + bwipe! + + " ASM + call writefile(['; comment', ';'], 'Xfile.i', 'D') + split Xfile.i + call assert_equal('asm', &filetype) + bwipe! + + " *.i defaults to progress + call writefile(['looks like progress'], 'Xfile.i', 'D') + split Xfile.i + call assert_equal('progress', &filetype) + bwipe! + + filetype off +endfunc + " vim: shiftwidth=2 sts=2 expandtab |