Mercurial > vim
comparison src/testdir/test_filetype.vim @ 27877:834d3fba1e7c v8.2.4464
patch 8.2.4464: Dtrace files are recognized as filetype D
Commit: https://github.com/vim/vim/commit/4d56b971cbae01cc454eb09713326224993e38ed
Author: =?UTF-8?q?Teubel=20Gy=C3=B6rgy?= <tgyurci@gmail.com>
Date: Thu Feb 24 17:59:09 2022 +0000
patch 8.2.4464: Dtrace files are recognized as filetype D
Problem: Dtrace files are recognized as filetype D.
Solution: Add a pattern for Dtrace files. (Teubel Gy?rgy, closes https://github.com/vim/vim/issues/9841)
Add some more testing.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Feb 2022 19:00:04 +0100 |
parents | 8fdc92bdcff1 |
children | e3014ada45a5 |
comparison
equal
deleted
inserted
replaced
27876:f98b3c85f54b | 27877:834d3fba1e7c |
---|---|
130 \ 'cupl': ['file.pld'], | 130 \ 'cupl': ['file.pld'], |
131 \ 'cuplsim': ['file.si'], | 131 \ 'cuplsim': ['file.si'], |
132 \ 'cvs': ['cvs123'], | 132 \ 'cvs': ['cvs123'], |
133 \ 'cvsrc': ['.cvsrc'], | 133 \ 'cvsrc': ['.cvsrc'], |
134 \ 'cynpp': ['file.cyn'], | 134 \ 'cynpp': ['file.cyn'], |
135 \ 'd': ['file.d'], | |
135 \ 'dart': ['file.dart', 'file.drt'], | 136 \ 'dart': ['file.dart', 'file.drt'], |
136 \ 'datascript': ['file.ds'], | 137 \ 'datascript': ['file.ds'], |
137 \ 'dcd': ['file.dcd'], | 138 \ 'dcd': ['file.dcd'], |
138 \ 'debchangelog': ['changelog.Debian', 'changelog.dch', 'NEWS.Debian', 'NEWS.dch', '/debian/changelog'], | 139 \ 'debchangelog': ['changelog.Debian', 'changelog.dch', 'NEWS.Debian', 'NEWS.dch', '/debian/changelog'], |
139 \ 'debcontrol': ['/debian/control', 'any/debian/control'], | 140 \ 'debcontrol': ['/debian/control', 'any/debian/control'], |
152 \ 'dosbatch': ['file.bat', 'file.sys'], | 153 \ 'dosbatch': ['file.bat', 'file.sys'], |
153 \ 'dosini': ['.editorconfig', '/etc/pacman.conf', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/pacman.conf', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap'], | 154 \ 'dosini': ['.editorconfig', '/etc/pacman.conf', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/pacman.conf', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap'], |
154 \ 'dot': ['file.dot', 'file.gv'], | 155 \ 'dot': ['file.dot', 'file.gv'], |
155 \ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'], | 156 \ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'], |
156 \ 'dtd': ['file.dtd'], | 157 \ 'dtd': ['file.dtd'], |
158 \ 'dtrace': ['/usr/lib/dtrace/io.d'], | |
157 \ 'dts': ['file.dts', 'file.dtsi'], | 159 \ 'dts': ['file.dts', 'file.dtsi'], |
158 \ 'dune': ['jbuild', 'dune', 'dune-project', 'dune-workspace'], | 160 \ 'dune': ['jbuild', 'dune', 'dune-project', 'dune-workspace'], |
159 \ 'dylan': ['file.dylan'], | 161 \ 'dylan': ['file.dylan'], |
160 \ 'dylanintr': ['file.intr'], | 162 \ 'dylanintr': ['file.intr'], |
161 \ 'dylanlid': ['file.lid'], | 163 \ 'dylanlid': ['file.lid'], |
825 | 827 |
826 call delete('Xfile.bas') | 828 call delete('Xfile.bas') |
827 filetype off | 829 filetype off |
828 endfunc | 830 endfunc |
829 | 831 |
832 func Test_d_file() | |
833 filetype on | |
834 | |
835 call writefile(['looks like D'], 'Xfile.d') | |
836 split Xfile.d | |
837 call assert_equal('d', &filetype) | |
838 bwipe! | |
839 | |
840 call writefile(['#!/some/bin/dtrace'], 'Xfile.d') | |
841 split Xfile.d | |
842 call assert_equal('dtrace', &filetype) | |
843 bwipe! | |
844 | |
845 call writefile(['#pragma D option'], 'Xfile.d') | |
846 split Xfile.d | |
847 call assert_equal('dtrace', &filetype) | |
848 bwipe! | |
849 | |
850 call writefile([':some:thing:'], 'Xfile.d') | |
851 split Xfile.d | |
852 call assert_equal('dtrace', &filetype) | |
853 bwipe! | |
854 | |
855 call writefile(['module this', '#pragma D option'], 'Xfile.d') | |
856 split Xfile.d | |
857 call assert_equal('d', &filetype) | |
858 bwipe! | |
859 | |
860 call writefile(['import that', '#pragma D option'], 'Xfile.d') | |
861 split Xfile.d | |
862 call assert_equal('d', &filetype) | |
863 bwipe! | |
864 | |
865 filetype off | |
866 endfunc | |
867 | |
830 func Test_dep3patch_file() | 868 func Test_dep3patch_file() |
831 filetype on | 869 filetype on |
832 | 870 |
833 call assert_true(mkdir('debian/patches', 'p')) | 871 call assert_true(mkdir('debian/patches', 'p')) |
834 | 872 |