awesome/spec/preload.lua
Uli Schlachter 844bd1eb05 Test that beautiful is not used too early (#1471)
For loading a theme, beautiful.init() has to be called. We do not handle
dynamic changes of the theme, so if the theme is changed after something
was already queried, this change will not apply. This also means that
before the theme is loaded, nothing useful can be returned. In fact,
code that tries to access the theme during require() will never get a
useful value from beautiful, but just nils.

To catch this, one Travis build is modified so that an error is raised
if the theme is accessed before beautiful.init() was called.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2017-02-15 00:46:27 +01:00

9 lines
411 B
Lua

-- This script is given to Busted via the --helper argument. Modules loaded here
-- won't be cleared and reloaded by Busted. This is needed for lgi because lgi
-- is not safe to reload and yet Busted manages to do this.
require("lgi")
-- "fix" some intentional beautiful breakage done by .travis.yml
require("beautiful").init{}
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80