From 3ca363115d029c0e19c303325db2ec391f07a574 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Tue, 24 Jan 2017 04:47:21 -0500 Subject: [PATCH] tests: Add tests for #1321 --- tests/test-maximize.lua | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tests/test-maximize.lua b/tests/test-maximize.lua index d16c980e0..489633cd9 100644 --- a/tests/test-maximize.lua +++ b/tests/test-maximize.lua @@ -23,6 +23,7 @@ local steps = { local c = client.get()[1] assert(not c.maximized_horizontal) assert(not c.maximized_vertical ) + assert(not c.maximized ) assert(not c.fullscreen ) c.maximized_horizontal = true @@ -99,6 +100,43 @@ local steps = { assert(new_geo[k] == v) end + c.floating = true + + awful.placement.centered(c) + original_geo = c:geometry() + + c.maximized = true + + + return true + end, + function() + local c = client.get()[1] + + local new_geo = c:geometry() + local sgeo = c.screen.workarea + + assert(c.maximized) + assert(c.floating) + assert(new_geo.x==sgeo.x) + assert(new_geo.y==sgeo.y) + + c.maximized = false + + return true + end, + function() + local c = client.get()[1] + + assert(not c.maximized) + assert(c.floating) + + local new_geo = c:geometry() + + for k,v in pairs(original_geo) do + assert(new_geo[k] == v) + end + return true end }