travelnet/integration_test.lua
Oversword be109dd8dc
Linting and code formatting (#17)
* Initial linting done

* Spaces spaces everywhere, more than you might think

* No space like home

* Continuation indentation

* Double down

* One more thing

* Undo practical change

* Update doors.lua to reduce line lengths

* String concatenation and line lengths

Co-authored-by: Oversword <bionic@oversword.co.uk>
Co-authored-by: OgelGames <olliverdc28@gmail.com>
2021-07-02 14:58:54 +10:00

26 lines
646 B
Lua

minetest.log("warning", "[TEST] integration-test enabled!")
minetest.register_on_mods_loaded(function()
minetest.after(1, function()
local data = minetest.write_json({ success=true }, true)
local file = io.open(minetest.get_worldpath() .. "/integration_test.json", "w")
if file then
file:write(data)
file:close()
end
file = io.open(minetest.get_worldpath() .. "/registered_nodes.txt", "w")
if file then
for name in pairs(minetest.registered_nodes) do
file:write(name .. "\n")
end
file:close()
end
minetest.log("warning", "[TEST] integration tests done!")
minetest.request_shutdown("success")
end)
end)