Comparison

spec/util_format_spec.lua @ 10035:386f085820e6

util.format: Handle integer formats the same way on Lua versions without integer support
author Kim Alvefur <zash@zash.se>
date Thu, 30 May 2019 13:54:11 +0200
parent 10034:4fca92d60040
child 11638:5f4a657136bc
comparison
equal deleted inserted replaced
10034:4fca92d60040 10035:386f085820e6
11 assert.equal("true", format("%s", true)); 11 assert.equal("true", format("%s", true));
12 assert.equal("[true]", format("%d", true)); 12 assert.equal("[true]", format("%d", true));
13 assert.equal("% [true]", format("%%", true)); 13 assert.equal("% [true]", format("%%", true));
14 assert.equal("{ }", format("%q", { })); 14 assert.equal("{ }", format("%q", { }));
15 assert.equal("[1.5]", format("%d", 1.5)); 15 assert.equal("[1.5]", format("%d", 1.5));
16 assert.equal("[7.3786976294838e+19]", format("%d", 73786976294838206464));
16 end); 17 end);
17 end); 18 end);
18 end); 19 end);