mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[spec] Better insulation (#4972)
Some combination of Travis and/or older Busted necessitated insufficient insulation. Follow-up to https://github.com/koreader/koreader/pull/4970 Space condensing carried over; reset at the start of readertoc.
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
-- don't try to overwrite metatables so we can use --auto-insulate-tests
|
||||
-- shamelessly copied from https://github.com/Olivine-Labs/busted/commit/db6d8b4be8fd099ab387efeb8232cfd905912abb
|
||||
local ffi = require "ffi"
|
||||
local old_metatype = ffi.metatype
|
||||
local exists = {}
|
||||
ffi.metatype = function(def, mttable)
|
||||
if exists[def] then return exists[def] end
|
||||
exists[def] = old_metatype(def, mttable)
|
||||
return exists[def]
|
||||
end
|
||||
|
||||
require "defaults"
|
||||
package.path = "?.lua;common/?.lua;rocks/share/lua/5.1/?.lua;frontend/?.lua;" .. package.path
|
||||
package.cpath = "?.so;common/?.so;/usr/lib/lua/?.so;rocks/lib/lua/5.1/?.so;" .. package.cpath
|
||||
|
||||
Reference in New Issue
Block a user