mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Prevent Busted from blowing up on cdata finalizers by properly closing
opened documents...
This commit is contained in:
@@ -20,6 +20,10 @@ describe("Readerpaging module", function()
|
||||
}
|
||||
paging = readerui.paging
|
||||
end)
|
||||
teardown(function()
|
||||
readerui:closeDocument()
|
||||
readerui:onClose()
|
||||
end)
|
||||
|
||||
it("should emit EndOfBook event at the end", function()
|
||||
UIManager:quit()
|
||||
@@ -53,6 +57,10 @@ describe("Readerpaging module", function()
|
||||
}
|
||||
paging = readerui.paging
|
||||
end)
|
||||
teardown(function()
|
||||
readerui:closeDocument()
|
||||
readerui:onClose()
|
||||
end)
|
||||
|
||||
it("should emit EndOfBook event at the end", function()
|
||||
UIManager:quit()
|
||||
@@ -81,6 +89,8 @@ describe("Readerpaging module", function()
|
||||
document = DocumentRegistry:openDocument(sample_djvu),
|
||||
}
|
||||
tmp_readerui.paging:onScrollPanRel(-100)
|
||||
tmp_readerui:closeDocument()
|
||||
tmp_readerui:onClose()
|
||||
end)
|
||||
|
||||
it("should scroll forward on the last page without crash", function()
|
||||
@@ -94,6 +104,8 @@ describe("Readerpaging module", function()
|
||||
paging:onScrollPanRel(120)
|
||||
paging:onScrollPanRel(-1)
|
||||
paging:onScrollPanRel(120)
|
||||
tmp_readerui:closeDocument()
|
||||
tmp_readerui:onClose()
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user