From b9d57fa107a456596e68d2ee3853ba75142a6930 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 13 Sep 2021 10:00:09 +0200 Subject: vim-patch:8.2.3432: octave/Matlab filetype detection does not work properly (#15652) Problem: Octave/Matlab filetype detection does not work properly. Solution: Update the patterns used for matching. (Doug Kearns) https://github.com/vim/vim/commit/ca0627df69c29508f6f797bef27a1f5fa9a447d3 --- src/nvim/testdir/test_filetype.vim | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index ed9bcf2720..cc789cb6bd 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -868,16 +868,6 @@ func Test_m_file() call assert_equal('octave', &filetype) bwipe! - call writefile(['#{', 'Octave block comment', '#}'], 'Xfile.m') - split Xfile.m - call assert_equal('octave', &filetype) - bwipe! - - call writefile(['%{', 'Octave block comment', '%}'], 'Xfile.m') - split Xfile.m - call assert_equal('octave', &filetype) - bwipe! - call writefile(['%!test "Octave test"'], 'Xfile.m') split Xfile.m call assert_equal('octave', &filetype) @@ -888,7 +878,7 @@ func Test_m_file() call assert_equal('octave', &filetype) bwipe! - call writefile(['function test(); 42; endfunction'], 'Xfile.m') + call writefile(['try; 42; end_try_catch'], 'Xfile.m') split Xfile.m call assert_equal('octave', &filetype) bwipe! @@ -900,6 +890,13 @@ func Test_m_file() call assert_equal('mma', &filetype) bwipe! + " MATLAB + + call writefile(['% MATLAB line comment'], 'Xfile.m') + split Xfile.m + call assert_equal('matlab', &filetype) + bwipe! + " Murphi call writefile(['-- Murphi comment'], 'Xfile.m') -- cgit