tests: Stabilize float format and %e in format_luav and format_string

This commit is contained in:
ZyX
2017-11-19 21:40:34 +03:00
parent 731dc82f8c
commit ebb33eddd9
3 changed files with 15 additions and 4 deletions

View File

@@ -375,7 +375,7 @@ local function eastnode2lua(pstate, eastnode, checked_nodes)
elseif typ == 'Integer' then
typ = typ .. ('(val=%u)'):format(tonumber(eastnode.data.num.value))
elseif typ == 'Float' then
typ = typ .. ('(val=%e)'):format(tonumber(eastnode.data.flt.value))
typ = typ .. format_string('(val=%e)', tonumber(eastnode.data.flt.value))
elseif typ == 'SingleQuotedString' or typ == 'DoubleQuotedString' then
if eastnode.data.str.value == nil then
typ = typ .. '(val=NULL)'