]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/141-resize.t
Merge branch 'master' into next
[i3/i3] / testcases / t / 141-resize.t
index 86954f1371c1a7270e20ccddf911827ec819631f..20dc68f49a29ed356dcf302d18c485c42f33c29b 100644 (file)
@@ -197,4 +197,48 @@ cmp_ok($content[0]->{rect}->{y}, '==', $oldrect->{y}, 'y the same as before');
 cmp_ok($content[0]->{rect}->{height}, '>', $oldrect->{height}, 'height bigger than before');
 cmp_ok($content[0]->{rect}->{width}, '==', $oldrect->{width}, 'width the same as before');
 
+# grow width
+$oldrect = $content[0]->{rect};
+
+cmd 'resize grow width 10px or 10ppt';
+
+@content = @{get_ws($tmp)->{floating_nodes}};
+cmp_ok($content[0]->{rect}->{x}, '==', $oldrect->{x}, 'x the same as before');
+cmp_ok($content[0]->{rect}->{y}, '==', $oldrect->{y}, 'y the same as before');
+cmp_ok($content[0]->{rect}->{height}, '==', $oldrect->{height}, 'height the same as before');
+cmp_ok($content[0]->{rect}->{width}, '>', $oldrect->{width}, 'width bigger than before');
+
+# shrink width
+$oldrect = $content[0]->{rect};
+
+cmd 'resize shrink width 10px or 10ppt';
+
+@content = @{get_ws($tmp)->{floating_nodes}};
+cmp_ok($content[0]->{rect}->{x}, '==', $oldrect->{x}, 'x the same as before');
+cmp_ok($content[0]->{rect}->{y}, '==', $oldrect->{y}, 'y the same as before');
+cmp_ok($content[0]->{rect}->{height}, '==', $oldrect->{height}, 'height the same as before');
+cmp_ok($content[0]->{rect}->{width}, '<', $oldrect->{width}, 'width smaller than before');
+
+# grow height
+$oldrect = $content[0]->{rect};
+
+cmd 'resize grow height 10px or 10ppt';
+
+@content = @{get_ws($tmp)->{floating_nodes}};
+cmp_ok($content[0]->{rect}->{x}, '==', $oldrect->{x}, 'x the same as before');
+cmp_ok($content[0]->{rect}->{y}, '==', $oldrect->{y}, 'y the same as before');
+cmp_ok($content[0]->{rect}->{height}, '>', $oldrect->{height}, 'height bigger than before');
+cmp_ok($content[0]->{rect}->{width}, '==', $oldrect->{width}, 'width the same as before');
+
+# shrink height
+$oldrect = $content[0]->{rect};
+
+cmd 'resize shrink height 10px or 10ppt';
+
+@content = @{get_ws($tmp)->{floating_nodes}};
+cmp_ok($content[0]->{rect}->{x}, '==', $oldrect->{x}, 'x the same as before');
+cmp_ok($content[0]->{rect}->{y}, '==', $oldrect->{y}, 'y the same as before');
+cmp_ok($content[0]->{rect}->{height}, '<', $oldrect->{height}, 'height smaller than before');
+cmp_ok($content[0]->{rect}->{width}, '==', $oldrect->{width}, 'width the same as before');
+
 done_testing;