2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
koreader/spec/unit/docsettings_spec.lua
2016-01-09 12:12:10 -08:00

11 lines
388 B
Lua

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