]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/504-move-workspace-to-output.t
Merge branch 'master' into next
[i3/i3] / testcases / t / 504-move-workspace-to-output.t
index c087f9f5ad117946b493383a5bbd893bf84922e3..efe0d6e7ab76f0587d429d82dac16cd2233a17e1 100644 (file)
@@ -77,10 +77,10 @@ sub workspaces_per_screen {
     my @outputs = @{$tree->{nodes}};
 
     my $fake0 = first { $_->{name} eq 'fake-0' } @outputs;
-    my $fake0_content = first { $_->{type} == 2 } @{$fake0->{nodes}};
+    my $fake0_content = first { $_->{type} eq 'con' } @{$fake0->{nodes}};
 
     my $fake1 = first { $_->{name} eq 'fake-1' } @outputs;
-    my $fake1_content = first { $_->{type} == 2 } @{$fake1->{nodes}};
+    my $fake1_content = first { $_->{type} eq 'con' } @{$fake1->{nodes}};
 
     my @fake0_workspaces = map { $_->{name} } @{$fake0_content->{nodes}};
     my @fake1_workspaces = map { $_->{name} } @{$fake1_content->{nodes}};
@@ -114,6 +114,16 @@ cmd 'move workspace to output left';
 ($x0, $x1) = workspaces_per_screen();
 ok('5' ~~ @$x0, 'workspace 5 back on fake-0');
 
+# Verify that wrapping works
+cmd 'move workspace to output left';
+($x0, $x1) = workspaces_per_screen();
+ok('5' ~~ @$x1, 'workspace 5 on fake-1');
+
+# Put workspace 5 where it should
+cmd 'move workspace to output left';
+($x0, $x1) = workspaces_per_screen();
+ok('5' ~~ @$x0, 'workspace 5 on fake-0 again');
+
 ################################################################################
 # Verify that coordinates of floating windows are fixed correctly when moving a
 # workspace to a different output.