comparison src/testdir/test_expr.vim @ 29544:80b4c435450a v9.0.0113

patch 9.0.0113: has() is not strict about parsing the patch version Commit: https://github.com/vim/vim/commit/d90f91fe3075bb51668ed926182b2163da9df001 Author: K.Takata <kentkt@csc.jp> Date: Sat Jul 30 15:43:59 2022 +0100 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 https://github.com/vim/vim/issues/10752)
author Bram Moolenaar <Bram@vim.org>
date Sat, 30 Jul 2022 16:45:05 +0200
parents 90565e49a13e
children 86eb4aba16c3
comparison
equal deleted inserted replaced
29543:b679513dc17c 29544:80b4c435450a
33 call assert_true(has('patch-7.4.01')) 33 call assert_true(has('patch-7.4.01'))
34 call assert_true(has('patch-7.4.1')) 34 call assert_true(has('patch-7.4.1'))
35 call assert_true(has('patch-6.9.999')) 35 call assert_true(has('patch-6.9.999'))
36 call assert_true(has('patch-7.1.999')) 36 call assert_true(has('patch-7.1.999'))
37 call assert_true(has('patch-7.4.123')) 37 call assert_true(has('patch-7.4.123'))
38 call assert_true(has('patch-7.4.123 ')) " Traling space can be allowed.
38 39
39 call assert_false(has('patch-7')) 40 call assert_false(has('patch-7'))
40 call assert_false(has('patch-7.4')) 41 call assert_false(has('patch-7.4'))
41 call assert_false(has('patch-7.4.')) 42 call assert_false(has('patch-7.4.'))
42 call assert_false(has('patch-9.1.0')) 43 call assert_false(has('patch-9.1.0'))
43 call assert_false(has('patch-9.9.1')) 44 call assert_false(has('patch-9.9.1'))
45
44 call assert_false(has('patch-abc')) 46 call assert_false(has('patch-abc'))
47 call assert_false(has('patchabc'))
48
49 call assert_false(has('patch-8x001'))
50 call assert_false(has('patch-9X0X0'))
51 call assert_false(has('patch-9-0-0'))
52 call assert_false(has('patch-09.0.0'))
53 call assert_false(has('patch-9.00.0'))
45 endfunc 54 endfunc
46 55
47 func Test_op_ternary() 56 func Test_op_ternary()
48 let lines =<< trim END 57 let lines =<< trim END
49 call assert_equal('yes', 1 ? 'yes' : 'no') 58 call assert_equal('yes', 1 ? 'yes' : 'no')