aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-19 15:08:53 +0800
committerGitHub <noreply@github.com>2024-07-19 15:08:53 +0800
commitd8aee77a4e74b0ac886fee1b29f719314051f39c (patch)
treeace5221035955d16ee50afe799f841201d8065a9 /test
parente54f503c44ed8a8d2892622577e6d2270b8f642b (diff)
parentf67a7365afacfad3f05e7aaca0bb2538a6e9f125 (diff)
downloadrneovim-d8aee77a4e74b0ac886fee1b29f719314051f39c.tar.gz
rneovim-d8aee77a4e74b0ac886fee1b29f719314051f39c.tar.bz2
rneovim-d8aee77a4e74b0ac886fee1b29f719314051f39c.zip
Merge pull request #29798 from zeertzjq/vim-9.1.0558
vim-patch:9.1.{0558,0602}
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_filetype.vim65
1 files changed, 65 insertions, 0 deletions
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
index 3dff957cd5..ba7836cd4f 100644
--- a/test/old/testdir/test_filetype.vim
+++ b/test/old/testdir/test_filetype.vim
@@ -2576,4 +2576,69 @@ func Test_uci_file()
filetype off
endfunc
+func Test_pro_file()
+ filetype on
+
+ "Prolog
+ call writefile([':-module(test/1,'], 'Xfile.pro', 'D')
+ split Xfile.pro
+ call assert_equal('prolog', &filetype)
+ bwipe!
+
+ call writefile(['% comment'], 'Xfile.pro', 'D')
+ split Xfile.pro
+ call assert_equal('prolog', &filetype)
+ bwipe!
+
+ call writefile(['/* multiline comment'], 'Xfile.pro', 'D')
+ split Xfile.pro
+ call assert_equal('prolog', &filetype)
+ bwipe!
+
+ call writefile(['rule(test, 1.7).'], 'Xfile.pro', 'D')
+ split Xfile.pro
+ call assert_equal('prolog', &filetype)
+ bwipe!
+
+ " IDL
+ call writefile(['x = findgen(100)/10'], 'Xfile.pro', 'D')
+ split Xfile.pro
+ call assert_equal('idlang', &filetype)
+
+ filetype off
+endfunc
+
+
+func Test_pl_file()
+ filetype on
+
+ "Prolog
+ call writefile([':-module(test/1,'], 'Xfile.pl', 'D')
+ split Xfile.pl
+ call assert_equal('prolog', &filetype)
+ bwipe!
+
+ call writefile(['% comment'], 'Xfile.pl', 'D')
+ split Xfile.pl
+ call assert_equal('prolog', &filetype)
+ bwipe!
+
+ call writefile(['/* multiline comment'], 'Xfile.pl', 'D')
+ split Xfile.pl
+ call assert_equal('prolog', &filetype)
+ bwipe!
+
+ call writefile(['rule(test, 1.7).'], 'Xfile.pl', 'D')
+ split Xfile.pl
+ call assert_equal('prolog', &filetype)
+ bwipe!
+
+ " Perl
+ call writefile(['%data = (1, 2, 3);'], 'Xfile.pl', 'D')
+ split Xfile.pl
+ call assert_equal('perl', &filetype)
+
+ filetype off
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab