]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

spec/timetable_spec.lua: Add more test cases for negative day normalisation
authordaurnimator <quae@daurnimator.com>
Sat, 9 Dec 2017 06:20:50 +0000 (17:20 +1100)
committerdaurnimator <quae@daurnimator.com>
Sat, 9 Dec 2017 06:20:50 +0000 (17:20 +1100)

index 3713391eb305e4052e2f4658090186260b450516..b7bc3e382028e7c9957b353ee46847903ae05ef0 100644 (file)
@@ -102,6 +102,12 @@ describe("Timetable library", function()
                assert.same({2016,11,30,00,00,00}, {timetable.normalise(2016,12,0,0,0,0)})
                assert.same({2017,11,30,00,00,00}, {timetable.normalise(2017,12,0,0,0,0)})
                assert.same({2018,11,30,00,00,00}, {timetable.normalise(2018,12,0,0,0,0)})
+               assert.same({2017,2,13,0,0,0}, {timetable.normalise(2017,3,-15,0,0,0)})
+               assert.same({2016,10,1,0,0,0}, {timetable.normalise(2017,3,-150,0,0,0)})
+               assert.same({2013,1,20,0,0,0}, {timetable.normalise(2017,3,-1500,0,0,0)})
+               assert.same({1976,2,4,0,0,0}, {timetable.normalise(2017,3,-15000,0,0,0)})
+               assert.same({1606,6,23,0,0,0}, {timetable.normalise(2017,3,-150000,0,0,0)})
        local function round_trip_add(t, field, x)