X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/d5edaa6f361af75bebab47497b4654cbe428a1b7..f45bee007bb9008d85b31404399dc6ed8bf707fc:/spec/parse_spec.lua?ds=sidebyside diff --git a/spec/parse_spec.lua b/spec/parse_spec.lua index 89c9a26..e38ad38 100644 --- a/spec/parse_spec.lua +++ b/spec/parse_spec.lua @@ -1,17 +1,17 @@ -describe ( "Time parsing library" , function ( ) +describe("Time parsing library", function() local timetable = require "luatz.timetable" local parse = require "luatz.parse" - it ( "#RFC3339 parsing" , function ( ) - assert.same ( timetable.new(2013,10,22,14,17,02) , (parse.rfc_3339 "2013-10-22T14:17:02Z") ) + it("#RFC3339 parsing", function() + assert.same(timetable.new(2013,10,22,14,17,02), (parse.rfc_3339 "2013-10-22T14:17:02Z")) -- Numeric offsets accepted - assert.same ( { timetable.new(2013,10,22,14,17,02) , 10*3600 } , { parse.rfc_3339 "2013-10-22T14:17:02+10:00" } ) + assert.same({timetable.new(2013,10,22,14,17,02), 10*3600 }, {parse.rfc_3339 "2013-10-22T14:17:02+10:00" }) -- Missing offsets parse - assert.same ( timetable.new(2013,10,22,14,17,02) , (parse.rfc_3339 "2013-10-22T14:17:02") ) + assert.same(timetable.new(2013,10,22,14,17,02), (parse.rfc_3339 "2013-10-22T14:17:02")) -- Invalid assert.same(nil, (parse.rfc_3339 "an invalid timestamp")) - end ) -end ) + end) +end)