diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-02-03 22:35:40 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-02-03 22:35:40 +0100 |
commit | 4bc0bed53695ac67db8d601f2a15e48e7a196688 (patch) | |
tree | 909d8e81be69f61b6d32b534668c695b64bc37ab | |
parent | 8a37b032895b40dd6953280c33585bcba0c7ef8b (diff) | |
download | vim-4bc0bed53695ac67db8d601f2a15e48e7a196688.zip |
patch 8.0.1465: python2 and python3 detection not tested
Problem: Python2 and python3 detection not tested. (Matej Cepl)
Solution: Add test for detecting python2 and python3. Also detect a script
using "js" as javascript.
-rw-r--r-- | runtime/scripts.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_filetype.vim | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/runtime/scripts.vim b/runtime/scripts.vim index fe05d265b..e271db89d 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -137,7 +137,7 @@ if s:line1 =~# "^#!" set ft=ruby " JavaScript - elseif s:name =~# 'node\(js\)\=\>' || s:name =~# 'rhino\>' + elseif s:name =~# 'node\(js\)\=\>\|js\>' || s:name =~# 'rhino\>' set ft=javascript " BC calculator diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index ccf801683..62dbc7473 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -561,10 +561,13 @@ let s:script_checks = { \ 'perl6': [['#!/path/perl6']], \ 'perl': [['#!/path/perl']], \ 'php': [['#!/path/php']], - \ 'python': [['#!/path/python']], + \ 'python': [['#!/path/python'], + \ ['#!/path/python2'], + \ ['#!/path/python3']], \ 'groovy': [['#!/path/groovy']], \ 'ruby': [['#!/path/ruby']], \ 'javascript': [['#!/path/node'], + \ ['#!/path/js'], \ ['#!/path/nodejs'], \ ['#!/path/rhino']], \ 'bc': [['#!/path/bc']], diff --git a/src/version.c b/src/version.c index 811d52105..352d491bf 100644 --- a/src/version.c +++ b/src/version.c @@ -772,6 +772,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1465, +/**/ 1464, /**/ 1463, |