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)
ca0627df69
This commit is contained in:
Christian Clason
2021-09-13 10:00:09 +02:00
committed by GitHub
parent 643cb8a6ec
commit b9d57fa107
2 changed files with 11 additions and 14 deletions

View File

@@ -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')