]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/122-split.t
Merge branch 'master' into next
[i3/i3] / testcases / t / 122-split.t
index 3484c7fc81212ae4db9328d00ea7de6ee61eb086..702679ac41e734880fc2a951231b2d853c81dcfd 100644 (file)
@@ -4,7 +4,6 @@
 # Tests splitting
 #
 use i3test;
-use X11::XCB qw(:all);
 
 my $tmp = fresh_workspace;
 
@@ -89,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;