aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-12-29 15:33:40 +0100
committerChristian Clason <ch.clason+github@icloud.com>2024-12-29 16:15:00 +0100
commit0e880b5612b0dece2863c70ee608971726ec5f2c (patch)
treef303925cfc09dddafc1a02f030fe504309b03f2b /test
parent493b6899ee898ec43217a8ae270b24bcc3b47281 (diff)
downloadrneovim-0e880b5612b0dece2863c70ee608971726ec5f2c.tar.gz
rneovim-0e880b5612b0dece2863c70ee608971726ec5f2c.tar.bz2
rneovim-0e880b5612b0dece2863c70ee608971726ec5f2c.zip
vim-patch:9.1.0972: filetype: TI linker map files are not recognized
Problem: filetype: TI linker map files are not recognized Solution: detect TI linker map files as lnkmap filetype (Wu, Zhenyu) References: https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html closes: vim/vim#16324 https://github.com/vim/vim/commit/5113831d16c05f3a8b47da0c6f95a641d5fc7b2e Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_filetype.vim19
1 files changed, 18 insertions, 1 deletions
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
index 88dcef423a..75092f8ece 100644
--- a/test/old/testdir/test_filetype.vim
+++ b/test/old/testdir/test_filetype.vim
@@ -459,7 +459,6 @@ func s:GetFilenameChecks() abort
\ 'mallard': ['file.page'],
"\ 'man': ['file.man'],
\ 'manconf': ['/etc/man.conf', 'man.config', 'any/etc/man.conf'],
- \ 'map': ['file.map'],
\ 'maple': ['file.mv', 'file.mpl', 'file.mws'],
\ 'markdown': ['file.markdown', 'file.mdown', 'file.mkd', 'file.mkdn', 'file.mdwn', 'file.md'],
\ 'masm': ['file.masm'],
@@ -2765,6 +2764,24 @@ func Test_make_file()
filetype off
endfunc
+func Test_map_file()
+ filetype on
+
+ " TI linker map file
+ call writefile(['******************************************************************************', ' TMS320C6x Linker Unix v7.4.24 ', '******************************************************************************'], 'Xfile.map', 'D')
+ split Xfile.map
+ call assert_equal('lnkmap', &filetype)
+ bwipe!
+
+ " TI linker map file
+ call writefile(['MAP', 'NAME "local-demo"', 'END'], 'Xfile.map', 'D')
+ split Xfile.map
+ call assert_equal('map', &filetype)
+ bwipe!
+
+ filetype off
+endfunc
+
func Test_org_file()
filetype on