]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/144-regress-floating-resize.t
Merge pull request #1937 from Airblader/bug-1910
[i3/i3] / testcases / t / 144-regress-floating-resize.t
index 44a67bc3e4996c22e5660c2e8bec0aa9108a6d72..6e42c883aa11982468101ea433eb1c7e6ba1ea5d 100644 (file)
@@ -1,6 +1,19 @@
 #!perl
 # vim:ts=4:sw=4:expandtab
 #
+# Please read the following documents before working on tests:
+# • http://build.i3wm.org/docs/testsuite.html
+#   (or docs/testsuite)
+#
+# • http://build.i3wm.org/docs/lib-i3test.html
+#   (alternatively: perldoc ./testcases/lib/i3test.pm)
+#
+# • http://build.i3wm.org/docs/ipc.html
+#   (or docs/ipc)
+#
+# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
+#   (unless you are already familiar with Perl)
+#
 # Regression: when resizing two containers on a workspace, opening a floating
 # client, then closing it again, i3 will re-distribute the space on the
 # workspace as if a tiling container was closed, leading to the containers
 #
 use i3test;
 use List::Util qw(sum);
-use X11::XCB::Connection;
-
-my $x = X11::XCB::Connection->new;
 
 my $tmp = fresh_workspace;
 
-cmd 'exec /usr/bin/urxvt';
-wait_for_map $x;
-cmd 'exec /usr/bin/urxvt';
-wait_for_map $x;
+my $first = open_window;
+my $second = open_window;
 
 my ($nodes, $focus) = get_ws_content($tmp);
 my $old_sum = sum map { $_->{rect}->{width} } @{$nodes};
-#cmd 'open';
+
 cmd 'resize grow left 10 px or 25 ppt';
 cmd 'split v';
-#cmd 'open';
-cmd 'exec /usr/bin/urxvt';
-wait_for_map $x;
+
+sync_with_i3;
+
+my $third = open_window;
 
 cmd 'mode toggle';
-sync_with_i3 $x;
+sync_with_i3;
 
 cmd 'kill';
-wait_for_unmap $x;
+sync_with_i3;
 
 ($nodes, $focus) = get_ws_content($tmp);
 my $new_sum = sum map { $_->{rect}->{width} } @{$nodes};