Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
brammool committed Jul 2, 2018
1 parent 33d5ab3 commit a8a60d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/testdir/test_lua.vim
Expand Up @@ -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
Expand Down Expand Up @@ -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]'))
Expand All @@ -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]'))

Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -789,6 +789,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
139,
/**/
138,
/**/
Expand Down

0 comments on commit a8a60d0

Please sign in to comment.