fix(tests: menubar): ignore warning about opening applications dir in /dev/null

This commit is contained in:
Uli Schlachter 2017-08-24 22:53:27 +02:00 committed by actionless
parent 25dea5bd2a
commit 98e762e5f7
1 changed files with 4 additions and 4 deletions

View File

@ -27,12 +27,12 @@ end
-- word "error" appears in our output, the test is considered to have failed.
do
local gdebug = require("gears.debug")
local orig_error = gdebug.print_error
function gdebug.print_error(msg)
local orig_warning = gdebug.print_warning
function gdebug.print_warning(msg)
msg = tostring(msg)
if (msg ~= "Error opening directory '/dev/null/.local/share/applications': Not a directory") and
if (not msg:match("/dev/null/.local/share/applications")) and
(not msg:match("No such file or directory")) then
orig_error(msg)
orig_warning(msg)
end
end
end