diff options
author | Kim Alvefur <zash@zash.se> | 2022-07-02 17:29:03 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-07-02 17:29:03 +0200 |
commit | 14fceee089e48f3326a49537af7d4ef0310d6215 (patch) | |
tree | acea642fe4531ca41d881553bf554020310058be /spec | |
parent | 084b949eca52eac6cbd43db7696b12b36d4fc423 (diff) | |
download | prosody-14fceee089e48f3326a49537af7d4ef0310d6215.tar.gz prosody-14fceee089e48f3326a49537af7d4ef0310d6215.zip |
tests: Remove special-casing of Lua 5.1
Part of #1600
Diffstat (limited to 'spec')
-rw-r--r-- | spec/util_cache_spec.lua | 2 | ||||
-rw-r--r-- | spec/util_format_spec.lua | 44 |
2 files changed, 22 insertions, 24 deletions
diff --git a/spec/util_cache_spec.lua b/spec/util_cache_spec.lua index d57e25ac..7a5522b8 100644 --- a/spec/util_cache_spec.lua +++ b/spec/util_cache_spec.lua @@ -314,7 +314,7 @@ describe("util.cache", function() end); - (_VERSION=="Lua 5.1" and pending or it)(":table works", function () + it(":table works", function () local t = cache.new(3):table(); assert.is.table(t); t["a"] = "1"; diff --git a/spec/util_format_spec.lua b/spec/util_format_spec.lua index cb473b47..1016a215 100644 --- a/spec/util_format_spec.lua +++ b/spec/util_format_spec.lua @@ -333,29 +333,27 @@ describe("util.format", function() end); end); - if _VERSION > "Lua 5.1" then -- COMPAT no %a or %A in Lua 5.1 - describe("to %a", function () - it("works", function () - assert.equal("0x1.84p+6", format("%a", 97)) - assert.equal("-0x1.81c8p+13", format("%a", -12345)) - assert.equal("0x1.8p+0", format("%a", 1.5)) - assert.equal("0x1p+66", format("%a", 73786976294838206464)) - assert.equal("inf", format("%a", math.huge)) - assert.equal("0x1.fffffffcp+30", format("%a", 2147483647)) - end); - end); - - describe("to %A", function () - it("works", function () - assert.equal("0X1.84P+6", format("%A", 97)) - assert.equal("-0X1.81C8P+13", format("%A", -12345)) - assert.equal("0X1.8P+0", format("%A", 1.5)) - assert.equal("0X1P+66", format("%A", 73786976294838206464)) - assert.equal("INF", format("%A", math.huge)) - assert.equal("0X1.FFFFFFFCP+30", format("%A", 2147483647)) - end); - end); - end + describe("to %a", function () + it("works", function () + assert.equal("0x1.84p+6", format("%a", 97)) + assert.equal("-0x1.81c8p+13", format("%a", -12345)) + assert.equal("0x1.8p+0", format("%a", 1.5)) + assert.equal("0x1p+66", format("%a", 73786976294838206464)) + assert.equal("inf", format("%a", math.huge)) + assert.equal("0x1.fffffffcp+30", format("%a", 2147483647)) + end); + end); + + describe("to %A", function () + it("works", function () + assert.equal("0X1.84P+6", format("%A", 97)) + assert.equal("-0X1.81C8P+13", format("%A", -12345)) + assert.equal("0X1.8P+0", format("%A", 1.5)) + assert.equal("0X1P+66", format("%A", 73786976294838206464)) + assert.equal("INF", format("%A", math.huge)) + assert.equal("0X1.FFFFFFFCP+30", format("%A", 2147483647)) + end); + end); describe("to %e", function () it("works", function () |