From: daurnimator Date: Mon, 18 Aug 2014 15:55:51 +0000 (-0400) Subject: spec/strftime: Generate format strings before tests, and use in test names X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/53d0e21097917a9f3c725ccc55d536bf895dc559?ds=sidebyside spec/strftime: Generate format strings before tests, and use in test names --- diff --git a/spec/strftime_spec.lua b/spec/strftime_spec.lua index 629e04a..f598db1 100644 --- a/spec/strftime_spec.lua +++ b/spec/strftime_spec.lua @@ -9,9 +9,9 @@ describe("strftime", function() "y", "Y", "z", "Z" , "%" } do local tt = luatz.gmtime(time) - it("Specifier "..spec.." is equivalent to os.date", function() - local f = "%"..spec - local osdf = "!%"..spec + local f = "%"..spec + local osdf = "!%"..spec + it("format specifier '"..f.."' is equivalent to os.date('"..osdf.."')", function() for i=1, 365*12 do local t = time + 60*60*24*i tt.day = tt.day + 1