changeset 14245:f445c5edb6af v8.1.0139

patch 8.1.0139: Lua tests fail on some platforms commit https://github.com/vim/vim/commit/a8a60d0c6b292216e55f005cf9637789a771d34b Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 2 22:54:36 2018 +0200 patch 8.1.0139: Lua tests fail on some platforms Problem: Lua tests fail on some platforms. Solution: Accept a hex number with and without "0x". (Ken Takata, closes #3137)
author Christian Brabandt <cb@256bit.org>
date Mon, 02 Jul 2018 23:00:07 +0200
parents 07c3af6def9a
children bdcaa04baead
files src/testdir/test_lua.vim src/version.c
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_lua.vim
+++ b/src/testdir/test_lua.vim
@@ -305,7 +305,7 @@ func Test_list()
   lua l:add(vim.eval("{'a':1, 'b':2, 'c':3}"))
   call assert_equal([123.0, 'abc', v:true, v:false, [1, 2, 3], {'a': 1, 'b': 2, 'c': 3}], l)
   call assert_equal(6.0, luaeval('#l'))
-  call assert_match('^list: 0x\x\+$', luaeval('tostring(l)'))
+  call assert_match('^list: \%(0x\)\?\x\+$', luaeval('tostring(l)'))
 
   lua l[0] = 124
   lua l[4] = nil
@@ -358,7 +358,7 @@ func Test_recursive_list()
 
   call assert_equal('[1.0, 2.0, [...]]', string(luaeval('l')))
 
-  call assert_match('^list: 0x\x\+$', luaeval('tostring(l)'))
+  call assert_match('^list: \%(0x\)\?\x\+$', luaeval('tostring(l)'))
   call assert_equal(luaeval('tostring(l)'), luaeval('tostring(l[2])'))
 
   call assert_equal(luaeval('l'), luaeval('l[2]'))
@@ -380,7 +380,7 @@ func Test_dict()
   lua d[5] = vim.eval("{'a':1, 'b':2, 'c':3}")
   call assert_equal({'0':123.0, '1':'abc', '2':v:true, '3':v:false, '4': [1, 2, 3], '5': {'a':1, 'b':2, 'c':3}}, d)
   call assert_equal(6.0, luaeval('#d'))
-  call assert_match('^dict: 0x\x\+$', luaeval('tostring(d)'))
+  call assert_match('^dict: \%(0x\)\?\x\+$', luaeval('tostring(d)'))
 
   call assert_equal('abc', luaeval('d[1]'))
 
--- a/src/version.c
+++ b/src/version.c
@@ -790,6 +790,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    139,
+/**/
     138,
 /**/
     137,