Skip to content

Commit a8a60d0

Browse files
committed
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)
1 parent 33d5ab3 commit a8a60d0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/testdir/test_lua.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func Test_list()
305305
lua l:add(vim.eval("{'a':1, 'b':2, 'c':3}"))
306306
call assert_equal([123.0, 'abc', v:true, v:false, [1, 2, 3], {'a': 1, 'b': 2, 'c': 3}], l)
307307
call assert_equal(6.0, luaeval('#l'))
308-
call assert_match('^list: 0x\x\+$', luaeval('tostring(l)'))
308+
call assert_match('^list: \%(0x\)\?\x\+$', luaeval('tostring(l)'))
309309

310310
lua l[0] = 124
311311
lua l[4] = nil
@@ -358,7 +358,7 @@ func Test_recursive_list()
358358

359359
call assert_equal('[1.0, 2.0, [...]]', string(luaeval('l')))
360360

361-
call assert_match('^list: 0x\x\+$', luaeval('tostring(l)'))
361+
call assert_match('^list: \%(0x\)\?\x\+$', luaeval('tostring(l)'))
362362
call assert_equal(luaeval('tostring(l)'), luaeval('tostring(l[2])'))
363363

364364
call assert_equal(luaeval('l'), luaeval('l[2]'))
@@ -380,7 +380,7 @@ func Test_dict()
380380
lua d[5] = vim.eval("{'a':1, 'b':2, 'c':3}")
381381
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)
382382
call assert_equal(6.0, luaeval('#d'))
383-
call assert_match('^dict: 0x\x\+$', luaeval('tostring(d)'))
383+
call assert_match('^dict: \%(0x\)\?\x\+$', luaeval('tostring(d)'))
384384

385385
call assert_equal('abc', luaeval('d[1]'))
386386

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,8 @@ static char *(features[]) =
789789

790790
static int included_patches[] =
791791
{ /* Add new patch number below this line */
792+
/**/
793+
139,
792794
/**/
793795
138,
794796
/**/

0 commit comments

Comments
 (0)