testcase: use open_empty_con in some more testcases
This commit is contained in:
parent
b4e3563dc1
commit
b572fea5c6
|
@ -14,17 +14,11 @@ $i3->command("workspace $tmp")->recv;
|
||||||
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
|
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
|
||||||
|
|
||||||
# Open two new container
|
# Open two new container
|
||||||
$i3->command("open")->recv;
|
my $first = open_empty_con($i3);
|
||||||
|
|
||||||
ok(@{get_ws_content($tmp)} == 1, 'containers opened');
|
ok(@{get_ws_content($tmp)} == 1, 'containers opened');
|
||||||
|
|
||||||
my ($nodes, $focus) = get_ws_content($tmp);
|
my $second = open_empty_con($i3);
|
||||||
my $first = $focus->[0];
|
|
||||||
|
|
||||||
$i3->command("open")->recv;
|
|
||||||
|
|
||||||
($nodes, $focus) = get_ws_content($tmp);
|
|
||||||
my $second = $focus->[0];
|
|
||||||
|
|
||||||
isnt($first, $second, 'different container focused');
|
isnt($first, $second, 'different container focused');
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,7 @@ $i3->command("workspace $tmp")->recv;
|
||||||
|
|
||||||
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
|
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
|
||||||
|
|
||||||
$i3->command('open')->recv;
|
my $first = open_empty_con($i3);
|
||||||
my ($nodes, $focus) = get_ws_content($tmp);
|
|
||||||
my $first = $focus->[0];
|
|
||||||
|
|
||||||
$i3->command('split v')->recv;
|
$i3->command('split v')->recv;
|
||||||
|
|
||||||
|
@ -29,10 +27,7 @@ $i3->command('level up')->recv;
|
||||||
my $split = $focus->[0];
|
my $split = $focus->[0];
|
||||||
$i3->command('level down')->recv;
|
$i3->command('level down')->recv;
|
||||||
|
|
||||||
$i3->command('open')->recv;
|
my $second = open_empty_con($i3);
|
||||||
|
|
||||||
($nodes, $focus) = get_ws_content($tmp);
|
|
||||||
my $second = $focus->[0];
|
|
||||||
|
|
||||||
isnt($first, $second, 'different container focused');
|
isnt($first, $second, 'different container focused');
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,8 @@ ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
|
||||||
# Enforce vertical split mode
|
# Enforce vertical split mode
|
||||||
$i3->command('split v')->recv;
|
$i3->command('split v')->recv;
|
||||||
|
|
||||||
$i3->command('open')->recv;
|
my $first = open_empty_con($i3);
|
||||||
my ($nodes, $focus) = get_ws_content($tmp);
|
my $second = open_empty_con($i3);
|
||||||
my $first = $focus->[0];
|
|
||||||
|
|
||||||
$i3->command('open')->recv;
|
|
||||||
($nodes, $focus) = get_ws_content($tmp);
|
|
||||||
my $second = $focus->[0];
|
|
||||||
|
|
||||||
isnt($first, $second, 'two different containers opened');
|
isnt($first, $second, 'two different containers opened');
|
||||||
|
|
||||||
|
@ -33,7 +28,7 @@ isnt($first, $second, 'two different containers opened');
|
||||||
##############################################################
|
##############################################################
|
||||||
|
|
||||||
$i3->command('layout stacking')->recv;
|
$i3->command('layout stacking')->recv;
|
||||||
($nodes, $focus) = get_ws_content($tmp);
|
my ($nodes, $focus) = get_ws_content($tmp);
|
||||||
is($focus->[0], $second, 'second container still focused');
|
is($focus->[0], $second, 'second container still focused');
|
||||||
|
|
||||||
$i3->command('next v')->recv;
|
$i3->command('next v')->recv;
|
||||||
|
|
|
@ -19,12 +19,8 @@ $i3->command("workspace $tmp")->recv;
|
||||||
|
|
||||||
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
|
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
|
||||||
|
|
||||||
$i3->command('open')->recv;
|
my $first = open_empty_con($i3);
|
||||||
my ($nodes, $focus) = get_ws_content($tmp);
|
my $second = open_empty_con($i3);
|
||||||
my $first = $focus->[0];
|
|
||||||
$i3->command('open')->recv;
|
|
||||||
($nodes, $focus) = get_ws_content($tmp);
|
|
||||||
my $second = $focus->[0];
|
|
||||||
ok(@{get_ws_content($tmp)} == 2, 'two containers on first ws');
|
ok(@{get_ws_content($tmp)} == 2, 'two containers on first ws');
|
||||||
|
|
||||||
$i3->command("workspace $tmp2")->recv;
|
$i3->command("workspace $tmp2")->recv;
|
||||||
|
@ -35,7 +31,7 @@ $i3->command("workspace $tmp")->recv;
|
||||||
$i3->command("move workspace $tmp2")->recv;
|
$i3->command("move workspace $tmp2")->recv;
|
||||||
ok(@{get_ws_content($tmp)} == 1, 'one container on first ws anymore');
|
ok(@{get_ws_content($tmp)} == 1, 'one container on first ws anymore');
|
||||||
ok(@{get_ws_content($tmp2)} == 1, 'one container on second ws');
|
ok(@{get_ws_content($tmp2)} == 1, 'one container on second ws');
|
||||||
($nodes, $focus) = get_ws_content($tmp2);
|
my ($nodes, $focus) = get_ws_content($tmp2);
|
||||||
|
|
||||||
is($focus->[0], $second, 'same container on different ws');
|
is($focus->[0], $second, 'same container on different ws');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue