]> 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 01765e1e92a8dbeb9f09081c8812b0c705d041e4..6afdd806fc52bbcd82b48430d33b35b50ab55f28 100644 (file)
@@ -145,7 +145,7 @@ sub get_output_content {
     is(scalar @outputs, 1, 'exactly one output (testcase not multi-monitor capable)');
     my $output = $outputs[0];
     # get the first (and only) CT_CON
-    return first { $_->{type} == 2 } @{$output->{nodes}};
+    return first { $_->{type} eq 'con' } @{$output->{nodes}};
 }
 
 $tmp = fresh_workspace;
@@ -158,4 +158,24 @@ is(get_output_content()->{layout}, 'splith', 'content container layout ok');
 cmd 'layout stacked';
 is(get_output_content()->{layout}, 'splith', 'content container layout still ok');
 
+######################################################################
+# Splitting a workspace that has more than one child
+######################################################################
+
+$tmp = fresh_workspace;
+
+cmd 'open';
+cmd 'open';
+cmd 'focus parent';
+cmd 'split v';
+cmd 'open';
+
+my $content = get_ws_content($tmp);
+my $fst = $content->[0];
+my $snd = $content->[1];
+
+is(@{$content}, 2, 'two containers on workspace');
+is(@{$fst->{nodes}}, 2, 'first child has two children');
+is(@{$snd->{nodes}}, 0, 'second child has no children');
+
 done_testing;