aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-31 08:20:00 +0800
committerGitHub <noreply@github.com>2023-08-31 08:20:00 +0800
commit5d49542b561e7f4826e28f7a0aeca94d47b3e0b7 (patch)
tree133f090e5d8f5e21397eb4bc2af50932be5b7c56 /test/old/testdir
parent79148813567909aae8bc733e585d7713f6069401 (diff)
downloadrneovim-5d49542b561e7f4826e28f7a0aeca94d47b3e0b7.tar.gz
rneovim-5d49542b561e7f4826e28f7a0aeca94d47b3e0b7.tar.bz2
rneovim-5d49542b561e7f4826e28f7a0aeca94d47b3e0b7.zip
vim-patch:9.0.1820: Rexx files may not be recognised (#24956)
Problem: Rexx files may not be recognised Solution: Add shebang detection and improve disambiguation of *.cls files closes: vim/vim#12951 https://github.com/vim/vim/commit/e06afb7860805537ccd69966bc03169852c9b378 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Diffstat (limited to 'test/old/testdir')
-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 5d6b306d09..1dd255ccf9 100644
--- a/test/old/testdir/test_filetype.vim
+++ b/test/old/testdir/test_filetype.vim
@@ -856,6 +856,8 @@ let s:script_checks = {
\ 'forth': [['#!/path/gforth']],
\ 'icon': [['#!/path/icon']],
\ 'crystal': [['#!/path/crystal']],
+ \ 'rexx': [['#!/path/rexx'],
+ \ ['#!/path/regina']],
\ }
" Various forms of "env" optional arguments.
@@ -1953,7 +1955,22 @@ func Test_cls_file()
" Rexx
- call writefile(['# rexx'], 'Xfile.cls')
+ call writefile(['#!/usr/bin/rexx'], 'Xfile.cls')
+ split Xfile.cls
+ call assert_equal('rexx', &filetype)
+ bwipe!
+
+ call writefile(['#!/usr/bin/regina'], 'Xfile.cls')
+ split Xfile.cls
+ call assert_equal('rexx', &filetype)
+ bwipe!
+
+ call writefile(['/* Comment */'], 'Xfile.cls')
+ split Xfile.cls
+ call assert_equal('rexx', &filetype)
+ bwipe!
+
+ call writefile(['::class Foo subclass Bar public'], 'Xfile.cls')
split Xfile.cls
call assert_equal('rexx', &filetype)
bwipe!