]> granicus.if.org Git - vim/commitdiff
patch 8.1.0139: Lua tests fail on some platforms v8.1.0139
authorBram Moolenaar <Bram@vim.org>
Mon, 2 Jul 2018 20:54:36 +0000 (22:54 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 2 Jul 2018 20:54:36 +0000 (22:54 +0200)
Problem:    Lua tests fail on some platforms.
Solution:   Accept a hex number with and without "0x". (Ken Takata,
            closes #3137)

src/testdir/test_lua.vim
src/version.c

index acd5b1755877e65de5d399cbdce239767ff7f1a3..73134718d327ec5456fe5dc5e0910872be80b33a 100644 (file)
@@ -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]'))
 
index 2e928782587e38017480db3a1b833a0036e77235..0fdf075f209eac3d6e66f78ed659c698275fd362 100644 (file)
@@ -789,6 +789,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    139,
 /**/
     138,
 /**/