0
0
mirror of https://github.com/vim/vim.git synced 2025-10-06 05:44:14 -04:00

patch 9.0.0113: has() is not strict about parsing the patch version

Problem:    has() is not strict about parsing the patch version.
Solution:   Check the version more strictly. (Ken Takata, closes #10752)
This commit is contained in:
K.Takata
2022-07-30 15:43:59 +01:00
committed by Bram Moolenaar
parent 0f823c3609
commit d90f91fe30
3 changed files with 29 additions and 11 deletions

View File

@@ -35,13 +35,22 @@ func Test_version()
call assert_true(has('patch-6.9.999'))
call assert_true(has('patch-7.1.999'))
call assert_true(has('patch-7.4.123'))
call assert_true(has('patch-7.4.123 ')) " Traling space can be allowed.
call assert_false(has('patch-7'))
call assert_false(has('patch-7.4'))
call assert_false(has('patch-7.4.'))
call assert_false(has('patch-9.1.0'))
call assert_false(has('patch-9.9.1'))
call assert_false(has('patch-abc'))
call assert_false(has('patchabc'))
call assert_false(has('patch-8x001'))
call assert_false(has('patch-9X0X0'))
call assert_false(has('patch-9-0-0'))
call assert_false(has('patch-09.0.0'))
call assert_false(has('patch-9.00.0'))
endfunc
func Test_op_ternary()