]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/32-move-workspace.t
tests: lib/i3test: Use //= instead of unless exists $args{key} (Thanks mxf)
[i3/i3] / testcases / t / 32-move-workspace.t
index 871be6da57a4998163a944ad1f8d9ecc79f9d641..3b50e39b9c7582ed21336512b37b01de50a606ec 100644 (file)
@@ -3,10 +3,9 @@
 #
 # Checks if the 'move workspace' command works correctly
 #
-use i3test tests => 11;
-use Time::HiRes qw(sleep);
+use i3test;
 
-my $i3 = i3("/tmp/nestedcons");
+my $i3 = i3(get_socket_path());
 
 # We move the pointer out of our way to avoid a bug where the focus will
 # be set to the window under the cursor
@@ -36,7 +35,7 @@ my ($nodes, $focus) = get_ws_content($tmp2);
 is($focus->[0], $second, 'same container on different ws');
 
 ($nodes, $focus) = get_ws_content($tmp);
-is($nodes->[0]->{focused}, 1, 'first container focused on first ws');
+ok($nodes->[0]->{focused}, 'first container focused on first ws');
 
 ###################################################################
 # check if floating cons are moved to new workspaces properly
@@ -48,7 +47,7 @@ $tmp2 = get_unused_workspace();
 cmd "workspace $tmp";
 
 cmd "open";
-cmd "mode toggle";
+cmd "floating toggle";
 
 my $ws = get_ws($tmp);
 is(@{$ws->{nodes}}, 0, 'no nodes on workspace');
@@ -60,4 +59,4 @@ $ws = get_ws($tmp2);
 is(@{$ws->{nodes}}, 0, 'no nodes on workspace');
 is(@{$ws->{floating_nodes}}, 1, 'one floating node on workspace');
 
-diag( "Testing i3, Perl $], $^X" );
+done_testing;