tests: Add a basic `key` shim

This commit is contained in:
Emmanuel Lepage Vallee 2018-07-24 17:07:11 -04:00
parent 3c79f1c8d5
commit f1245f083c
2 changed files with 8 additions and 1 deletions

View File

@ -7,7 +7,7 @@ return function(_, _)
-- Set the global shims
-- luacheck: globals awesome root tag screen client mouse drawin button
-- luacheck: globals mousegrabber keygrabber dbus
-- luacheck: globals mousegrabber keygrabber dbus key
awesome = require( "awesome" )
root = require( "root" )
tag = require( "tag" )
@ -19,6 +19,7 @@ return function(_, _)
keygrabber = require( "keygrabber" )
mousegrabber = require( "mousegrabber" )
dbus = require( "dbus" )
key = require( "key" )
-- Force luacheck to be silent about setting those as unused globals
assert(awesome and root and tag and screen and client and mouse)

View File

@ -0,0 +1,6 @@
local gobject = require("gears.object")
local gtable = require("gears.table")
return setmetatable({}, {__call = function(_, args)
return gtable.crush(gobject(), args)
end})