Bugfix for the last commit (broke some moving situations), update testcase

This commit is contained in:
Michael Stapelberg
2010-11-28 20:15:47 +01:00
parent 780b0ddbbc
commit 2dba7ec1ec
2 changed files with 40 additions and 17 deletions

View File

@ -7,7 +7,7 @@
# 3) move a container inside another container
# 4) move a container in a different direction so that we need to go up in tree
#
use i3test tests => 17;
use i3test tests => 16;
use X11::XCB qw(:all);
my $i3 = i3("/tmp/nestedcons");
@ -26,13 +26,13 @@ is(@{$old_content}, 1, 'one container on this workspace');
my $first = $old_content->[0]->{id};
$i3->command('move before h')->recv;
$i3->command('move before v')->recv;
$i3->command('move after v')->recv;
$i3->command('move after h')->recv;
#$i3->command('move before h')->recv;
#$i3->command('move before v')->recv;
#$i3->command('move after v')->recv;
#$i3->command('move after h')->recv;
my $content = get_ws_content($tmp);
is_deeply($old_content, $content, 'workspace unmodified after useless moves');
#is_deeply($old_content, $content, 'workspace unmodified after useless moves');
######################################################################
# 2) move a container before another single container
@ -110,16 +110,23 @@ $content = get_ws_content($tmp);
is(@{$content}, 2, 'two nodes on this workspace');
######################################################################
# 4) Move a container horizontally when inside a vertical split container.
# The container will be moved to the workspace level and the old vsplit
# 4) We create two v-split containers on the workspace, then we move
# all Cons from the left v-split to the right one. The old vsplit
# container needs to be closed. Verify that it will be closed.
######################################################################
my $otmp = get_unused_workspace();
$i3->command("workspace $otmp")->recv;
$i3->command("open")->recv;
$i3->command("open")->recv;
$i3->command("split v")->recv;
$i3->command("open")->recv;
$i3->command("prev h")->recv;
$i3->command("split v")->recv;
$i3->command("open")->recv;
$i3->command("move after h")->recv;
$i3->command("prev h")->recv;
$i3->command("move after h")->recv;
$content = get_ws_content($otmp);