]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/09-stacking.t
tests: Bugfix: 11-goto.t: use mktemp for generating a random mark, not base64
[i3/i3] / testcases / t / 09-stacking.t
index 8f40047e324aad71008ab65ef3368f32df070b67..cc285f32788162d946c1dac5a47d2830d725d8ea 100644 (file)
@@ -4,38 +4,30 @@
 # the workspace to be empty).
 # TODO: skip it by default?
 
-use Test::More tests => 24;
-use Test::Deep;
+use i3test tests => 22;
 use X11::XCB qw(:all);
-use Data::Dumper;
 use Time::HiRes qw(sleep);
-use FindBin;
-use lib "$FindBin::Bin/lib";
-use i3test;
 
 BEGIN {
-    use_ok('IO::Socket::UNIX') or BAIL_OUT('Cannot load IO::Socket::UNIX');
     use_ok('X11::XCB::Connection') or BAIL_OUT('Cannot load X11::XCB::Connection');
 }
 
+SKIP: {
+    skip "stacking test not yet updated", 21;
+
 my $x = X11::XCB::Connection->new;
 
-my $sock = IO::Socket::UNIX->new(Peer => '/tmp/i3-ipc.sock');
-isa_ok($sock, 'IO::Socket::UNIX');
+my $i3 = i3;
 
 # Switch to the nineth workspace
-$sock->write(i3test::format_ipc_command("9"));
-
-sleep(0.25);
+$i3->command('9')->recv;
 
 #####################################################################
 # Create two windows and make sure focus switching works
 #####################################################################
 
 my $top = i3test::open_standard_window($x);
-sleep(0.25);
 my $mid = i3test::open_standard_window($x);
-sleep(0.25);
 my $bottom = i3test::open_standard_window($x);
 sleep(0.25);
 
@@ -50,8 +42,7 @@ diag("bottom id = " . $bottom->id);
 sub focus_after {
     my $msg = shift;
 
-    $sock->write(i3test::format_ipc_command($msg));
-    sleep(0.25);
+    $i3->command($msg)->recv;
     return $x->input_focus;
 }
 
@@ -136,3 +127,4 @@ is($focus, $bottom->id, "Window above is bottom");
 $focus = focus_after("k");
 is($focus, $mid->id, "Window above is mid");
 
+}