2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00
koreader/spec/unit/docsettings_spec.lua

13 lines
481 B
Lua

describe("docsettings module", function()
local docsettings
setup(function()
require("commonrequire")
docsettings = require("docsettings")
end)
it("should generate sidecar directory path", function()
assert.Equals("../../foo.sdr", docsettings:getSidecarDir("../../foo.pdf"))
assert.Equals("/foo/bar.sdr", docsettings:getSidecarDir("/foo/bar.pdf"))
assert.Equals("baz.sdr", docsettings:getSidecarDir("baz.pdf"))
end)
end)