From 187b766cbe393fb8d8bc296f8e31cb5c83bd18e3 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Thu, 14 Oct 2021 13:59:45 -0700 Subject: [PATCH] tests: Test naughty.notification.ignore_suspend --- tests/test-naughty-suspended.lua | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/test-naughty-suspended.lua b/tests/test-naughty-suspended.lua index f3264c4f1..24328dccf 100644 --- a/tests/test-naughty-suspended.lua +++ b/tests/test-naughty-suspended.lua @@ -103,4 +103,40 @@ table.insert(steps, function() return true end) +-- Test `ignore_suspend`. +table.insert(steps, function() + naughty.suspended = true + display_count = 0 + + notifs[1] = notification { + title = "test3", + ignore_suspend = true, + } + + notifs[2] = notification { + title = "test4" + } + + return true +end) + +table.insert(steps, function() + if display_count ~= 1 then return end + + notifs[2]:destroy() + + naughty.suspended = false + + + return true +end) + +table.insert(steps, function() + if display_count ~= 1 then return end + + notifs[1]:destroy() + + return true +end) + require("_runner").run_steps(steps)