aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Clason <christian.clason@uni-due.de>2021-09-13 10:00:09 +0200
committerGitHub <noreply@github.com>2021-09-13 10:00:09 +0200
commitb9d57fa107a456596e68d2ee3853ba75142a6930 (patch)
tree8b33505656c97680286e93ca882bf1858f350f33 /src
parent643cb8a6ecc9c78580ccaf1821b52f836b7b7ef4 (diff)
downloadrneovim-b9d57fa107a456596e68d2ee3853ba75142a6930.tar.gz
rneovim-b9d57fa107a456596e68d2ee3853ba75142a6930.tar.bz2
rneovim-b9d57fa107a456596e68d2ee3853ba75142a6930.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_filetype.vim19
1 files changed, 8 insertions, 11 deletions
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')