mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
d07fc822a1
The usual "a or b"-trick to simulate C's ?:-operator does not work when "false" is a valid value. Fix the code to handle this correctly and add a short unit test which would have caught this problem. Signed-off-by: Uli Schlachter <psychon@znc.in>
20 lines
641 B
Lua
20 lines
641 B
Lua
local beautiful = require("beautiful")
|
|
local runner = require("_runner")
|
|
|
|
local t = screen.primary.tags[1]
|
|
assert(t)
|
|
|
|
-- The default should be true
|
|
assert(t.gap_single_client == true, tostring(t.gap_single_client))
|
|
|
|
-- Beautiful should override the default
|
|
beautiful.gap_single_client = false
|
|
assert(t.gap_single_client == false, tostring(t.gap_single_client))
|
|
|
|
-- Tag-specific properties should override beautiful
|
|
t.gap_single_client = true
|
|
assert(t.gap_single_client == true, tostring(t.gap_single_client))
|
|
|
|
runner.run_steps({ function() return true end })
|
|
|
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|