From: hwangcc23 Date: Sun, 6 Aug 2017 15:08:05 +0000 (+0800) Subject: Add regression tests for #2846 X-Git-Tag: 4.15~50^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a34a0048a1a9c009e23162f3039254768fc2fa8e;p=i3%2Fi3 Add regression tests for #2846 1). Add one regression test in 167-workspace_layout.t: - Get a fresh workspace - Set the layout to something - Create windows - Try to switch to another layout - Check if successful - Repeat for all 12 possible transitions 2). Add another regression test in 167-workspace_layout.t: - Check that the command 'layout toggle split' works regardless of what layout we're using --- diff --git a/testcases/t/167-workspace_layout.t b/testcases/t/167-workspace_layout.t index d983eb85..597d545e 100644 --- a/testcases/t/167-workspace_layout.t +++ b/testcases/t/167-workspace_layout.t @@ -375,7 +375,74 @@ ok(@content == 2, 'two containers opened'); isnt($content[0]->{layout}, 'tabbed', 'layout not tabbed'); isnt($content[1]->{layout}, 'tabbed', 'layout not tabbed'); +exit_gracefully($pid); + +##################################################################### +# 16: Check that the command 'layout toggle split' works regardless +# of what layout we're using. +##################################################################### + +$config = <{layout}, 'splitv', 'layout toggles to splitv'); + } else { + is($content[0]->{layout}, 'splith', 'layout toggles to splith'); + } + + cmd '[id="' . $first->id . '"] kill'; + cmd '[id="' . $second->id . '"] kill'; + sync_with_i3; +} exit_gracefully($pid); +##################################################################### +# 17: Check about setting a new layout. +##################################################################### + +$config = <{layout}, $second_layout, 'layout changes to ' . $second_layout); + + cmd '[id="' . $first->id . '"] kill'; + cmd '[id="' . $second->id . '"] kill'; + sync_with_i3; + } +} + done_testing;