mirror of https://github.com/koreader/koreader
commit
1ebc1de944
@ -0,0 +1,20 @@
|
||||
# Travis-CI Build for koreader
|
||||
# see travis-ci.org for details
|
||||
|
||||
language: c
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
|
||||
env:
|
||||
- EMULATE_READER=1 USE_NO_CCACHE=1
|
||||
|
||||
install:
|
||||
- sudo apt-get install libsdl1.2-dev luarocks
|
||||
- git clone https://github.com/Olivine-Labs/busted/
|
||||
- cd busted && git checkout v1.10.0 && sudo luarocks make && cd ..
|
||||
|
||||
script:
|
||||
- make fetchthirdparty
|
||||
- make
|
||||
- make testfront
|
@ -1 +1 @@
|
||||
Subproject commit 3153b92693a4a57cbe6e21d32f94b1f89e115633
|
||||
Subproject commit b7b14ec4d09f0a6330ce6b05ce9d4c8e6a6eb572
|
@ -1 +1 @@
|
||||
Subproject commit 3565578196c001d5a3099d3fa9a754e4c2832403
|
||||
Subproject commit adfd78e69146657566f18fa8815ff0028b1f4e21
|
@ -0,0 +1,57 @@
|
||||
require "defaults"
|
||||
package.path = "?.lua;common/?.lua;frontend/?.lua"
|
||||
package.cpath = "?.so;common/?.so;/usr/lib/lua/?.so"
|
||||
|
||||
require "libs/libkoreader-lfs"
|
||||
-- global einkfb for Screen
|
||||
einkfb = require("ffi/framebuffer")
|
||||
-- do not show SDL window
|
||||
einkfb.dummy = true
|
||||
Blitbuffer = require("ffi/blitbuffer")
|
||||
|
||||
local Screen = require("ui/screen")
|
||||
local DocSettings = require("docsettings")
|
||||
G_reader_settings = DocSettings:open(".reader")
|
||||
local DocumentRegistry = require("document/documentregistry")
|
||||
local Cache = require("cache")
|
||||
local DEBUG = require("dbg")
|
||||
--DEBUG:turnOn()
|
||||
|
||||
-- screen should be inited for crengine
|
||||
Screen:init()
|
||||
|
||||
describe("Cache module", function()
|
||||
local sample_pdf = "spec/front/unit/data/sample.pdf"
|
||||
local doc = DocumentRegistry:openDocument(sample_pdf)
|
||||
it("should clear cache", function()
|
||||
Cache:clear()
|
||||
end)
|
||||
it("should serialize blitbuffer", function()
|
||||
for pageno = 1, math.min(10, doc.info.number_of_pages) do
|
||||
doc:renderPage(pageno, nil, 1, 0, 1.0, 0)
|
||||
Cache:serialize()
|
||||
end
|
||||
Cache:clear()
|
||||
end)
|
||||
it("should deserialize blitbuffer", function()
|
||||
for pageno = 1, math.min(10, doc.info.number_of_pages) do
|
||||
doc:hintPage(pageno, 1, 0, 1.0, 0)
|
||||
end
|
||||
Cache:clear()
|
||||
end)
|
||||
it("should serialize koptcontext", function()
|
||||
doc.configurable.text_wrap = 1
|
||||
for pageno = 1, math.min(10, doc.info.number_of_pages) do
|
||||
doc:renderPage(pageno, nil, 1, 0, 1.0, 0)
|
||||
doc:getPageDimensions(pageno)
|
||||
Cache:serialize()
|
||||
end
|
||||
Cache:clear()
|
||||
end)
|
||||
it("should deserialize koptcontext", function()
|
||||
for pageno = 1, math.min(10, doc.info.number_of_pages) do
|
||||
doc:renderPage(pageno, nil, 1, 0, 1.0, 0)
|
||||
end
|
||||
Cache:clear()
|
||||
end)
|
||||
end)
|
Binary file not shown.
Loading…
Reference in New Issue