test-spawn-snid.lua: Use test client instead of urxvt
Startup notification support in urxvt is optional while GTK always supports startup notification. Thus, use the new GTK-based test client for the SN tests. Fixes: https://github.com/awesomeWM/awesome/issues/848 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
697a88958e
commit
6b4a2625cb
|
@ -3,7 +3,7 @@ local spawn = require("awful.spawn")
|
||||||
-- This file provide a simple, yet flexible, test client.
|
-- This file provide a simple, yet flexible, test client.
|
||||||
-- It is used to test the `awful.rules`
|
-- It is used to test the `awful.rules`
|
||||||
|
|
||||||
return function(class, title)
|
return function(class, title, use_sn)
|
||||||
title = title or 'Awesome test client'
|
title = title or 'Awesome test client'
|
||||||
|
|
||||||
local cmd = {"lua" , "-e", table.concat {
|
local cmd = {"lua" , "-e", table.concat {
|
||||||
|
@ -28,5 +28,5 @@ return function(class, title)
|
||||||
"app:run {''}"
|
"app:run {''}"
|
||||||
}}
|
}}
|
||||||
|
|
||||||
spawn(cmd)
|
return spawn(cmd, use_sn)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--- Tests for spawn's startup notifications.
|
--- Tests for spawn's startup notifications.
|
||||||
|
|
||||||
local runner = require("_runner")
|
local runner = require("_runner")
|
||||||
local spawn = require("awful.spawn")
|
local test_client = require("_client")
|
||||||
|
|
||||||
local manage_called, c_snid
|
local manage_called, c_snid
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ local ret, snid
|
||||||
local steps = {
|
local steps = {
|
||||||
function(count)
|
function(count)
|
||||||
if count == 1 then
|
if count == 1 then
|
||||||
ret, snid = spawn('urxvt', true)
|
ret, snid = test_client("foo", "bar", true)
|
||||||
elseif manage_called then
|
elseif manage_called then
|
||||||
assert(ret)
|
assert(ret)
|
||||||
assert(snid)
|
assert(snid)
|
||||||
|
@ -29,7 +29,7 @@ local steps = {
|
||||||
function(count)
|
function(count)
|
||||||
if count == 1 then
|
if count == 1 then
|
||||||
manage_called = false
|
manage_called = false
|
||||||
ret, snid = spawn('urxvt', false)
|
ret, snid = test_client("bar", "foo", false)
|
||||||
elseif manage_called then
|
elseif manage_called then
|
||||||
assert(ret)
|
assert(ret)
|
||||||
assert(snid == nil)
|
assert(snid == nil)
|
||||||
|
|
Loading…
Reference in New Issue