Mercurial > vim
comparison src/testdir/test_functions.vim @ 29334:72d1b2ea70dc v9.0.0010
patch 9.0.0010: returning 0 for has('patch-9.0.0') is inconsistent
Commit: https://github.com/vim/vim/commit/b0375d466e5ca57dca71995c342870b3226d8115
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 30 11:03:39 2022 +0100
patch 9.0.0010: returning 0 for has('patch-9.0.0') is inconsistent
Problem: Returning 0 for has('patch-9.0.0') is inconsistent.
Solution: Make it return 1. (closes https://github.com/vim/vim/issues/10640)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 30 Jun 2022 12:15:04 +0200 |
parents | c7bd1040a1c4 |
children | 349517ab7398 |
comparison
equal
deleted
inserted
replaced
29333:38a15f3738a2 | 29334:72d1b2ea70dc |
---|---|
38 call assert_equal(0, has('nonexistent', 1)) | 38 call assert_equal(0, has('nonexistent', 1)) |
39 | 39 |
40 " Will we ever have patch 9999? | 40 " Will we ever have patch 9999? |
41 let ver = 'patch-' .. v:version / 100 .. '.' .. v:version % 100 .. '.9999' | 41 let ver = 'patch-' .. v:version / 100 .. '.' .. v:version % 100 .. '.9999' |
42 call assert_equal(0, has(ver)) | 42 call assert_equal(0, has(ver)) |
43 | |
44 " There actually isn't a patch 9.0.0, but this is more consistent. | |
45 call assert_equal(1, has('patch-9.0.0')) | |
43 endfunc | 46 endfunc |
44 | 47 |
45 func Test_empty() | 48 func Test_empty() |
46 call assert_equal(1, empty('')) | 49 call assert_equal(1, empty('')) |
47 call assert_equal(0, empty('a')) | 50 call assert_equal(0, empty('a')) |