X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=testcases%2Ft%2F122-split.t;h=702679ac41e734880fc2a951231b2d853c81dcfd;hb=ed2bcc15e384be99225a247435f6cff678e64f0c;hp=71736db462fd7e8d47400f5f25e4cf754d36d12e;hpb=cea6f7ad96c5e28274dd49c4c394db7f80884bde;p=i3%2Fi3 diff --git a/testcases/t/122-split.t b/testcases/t/122-split.t index 71736db4..702679ac 100644 --- a/testcases/t/122-split.t +++ b/testcases/t/122-split.t @@ -88,4 +88,25 @@ cmd 'split v'; my $count = sum_nodes(\@content); is($count, $old_count, 'not more windows after splitting again'); +###################################################################### +# In the special case of being inside a stacked or tabbed container, we don’t +# want this to happen. +###################################################################### + +$tmp = fresh_workspace; + +cmd 'open'; +@content = @{get_ws_content($tmp)}; +is(scalar @content, 1, 'Precisely one container on this ws'); +cmd 'layout stacked'; +@content = @{get_ws_content($tmp)}; +is(scalar @content, 1, 'Still one container on this ws'); +is(scalar @{$content[0]->{nodes}}, 1, 'Stacked con has one child node'); + +cmd 'split h'; +cmd 'open'; +@content = @{get_ws_content($tmp)}; +is(scalar @content, 1, 'Still one container on this ws'); +is(scalar @{$content[0]->{nodes}}, 1, 'Stacked con still has one child node'); + done_testing;