From 6b4a2625cb1334f47934cc7089395e92b8d0c773 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Thu, 5 May 2016 18:33:18 +0200 Subject: [PATCH] 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 --- tests/_client.lua | 4 ++-- tests/test-spawn-snid.lua | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/_client.lua b/tests/_client.lua index 10f0700ea..1275584b2 100644 --- a/tests/_client.lua +++ b/tests/_client.lua @@ -3,7 +3,7 @@ local spawn = require("awful.spawn") -- This file provide a simple, yet flexible, test client. -- It is used to test the `awful.rules` -return function(class, title) +return function(class, title, use_sn) title = title or 'Awesome test client' local cmd = {"lua" , "-e", table.concat { @@ -28,5 +28,5 @@ return function(class, title) "app:run {''}" }} - spawn(cmd) + return spawn(cmd, use_sn) end diff --git a/tests/test-spawn-snid.lua b/tests/test-spawn-snid.lua index 2aaadc084..1bfb706a6 100644 --- a/tests/test-spawn-snid.lua +++ b/tests/test-spawn-snid.lua @@ -1,7 +1,7 @@ --- Tests for spawn's startup notifications. local runner = require("_runner") -local spawn = require("awful.spawn") +local test_client = require("_client") local manage_called, c_snid @@ -15,7 +15,7 @@ local ret, snid local steps = { function(count) if count == 1 then - ret, snid = spawn('urxvt', true) + ret, snid = test_client("foo", "bar", true) elseif manage_called then assert(ret) assert(snid) @@ -29,7 +29,7 @@ local steps = { function(count) if count == 1 then manage_called = false - ret, snid = spawn('urxvt', false) + ret, snid = test_client("bar", "foo", false) elseif manage_called then assert(ret) assert(snid == nil)