From 1877cd5fcdc0bbe5f3d0685d42d4e295fb819724 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 31 Dec 2024 11:53:02 +0100 Subject: vim-patch:9.1.0982: TI linker files are not recognized Problem: TI linker files are not recognized Solution: inspect '*.cmd' files and detect TI linker files as 'lnk' filetype, include a lnk ftplugin and syntax script (Wu, Zhenyu) closes: vim/vim#16320 https://github.com/vim/vim/commit/39a4eb0b2ca901b59800fad086550053556e59dc Co-authored-by: Wu, Zhenyu --- test/old/testdir/test_filetype.vim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'test') diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index 462bf2e025..1bf2bdb360 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -2300,6 +2300,27 @@ func Test_cls_file() filetype off endfunc +func Test_cmd_file() + filetype on + + call writefile(['--rom_model'], 'Xfile.cmd') + split Xfile.cmd + call assert_equal('lnk', &filetype) + bwipe! + + call writefile(['/* comment */'], 'Xfile.cmd') + split Xfile.cmd + call assert_equal('rexx', &filetype) + bwipe! + + call writefile(['REM comment'], 'Xfile.cmd') + split Xfile.cmd + call assert_equal('dosbatch', &filetype) + bwipe! + + filetype off +endfunc + func Test_sig_file() filetype on -- cgit