]> git.madduck.net Git - etc/awesome.git/blob - .config/awesome/modules/luatz/spec/tzcache_spec.lua

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:

switch to tag for a dialog
[etc/awesome.git] / .config / awesome / modules / luatz / spec / tzcache_spec.lua
1 describe("Opening/reading system files", function()
2         local tzcache = require "luatz.tzcache"
3         it("should have a localtime", function()
4                 tzcache.get_tz()
5         end)
6         it("should be able to open UTC", function()
7                 tzcache.get_tz("UTC")
8         end)
9         it("should re-use results from cache", function()
10                 -- If cached it should return the same table
11                 local localtime = tzcache.get_tz()
12                 assert.are.equal(localtime, tzcache.get_tz())
13                 -- Once cache is cleared it should return a new table
14                 tzcache.clear_tz_cache()
15                 assert._not.equal(localtime, tzcache.get_tz())
16         end)
17 end)