tests: clean up/beautify all tests (code style / test style)

This commit is contained in:
Michael Stapelberg
2011-03-09 20:25:17 +01:00
parent 57e7cc8f6a
commit 2524b5262d
53 changed files with 334 additions and 415 deletions

View File

@ -4,12 +4,11 @@
# Check if new containers are opened after the currently focused one instead
# of always at the end
use List::Util qw(first);
use i3test tests => 7;
use i3test;
my $i3 = i3("/tmp/nestedcons");
my $tmp = get_unused_workspace();
$i3->command("workspace $tmp")->recv;
my $tmp = fresh_workspace;
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
@ -26,8 +25,8 @@ isnt($first, $second, 'different container focused');
# see if new containers open after the currently focused
##############################################################
$i3->command(qq|[con_id="$first"] focus|)->recv;
$i3->command('open')->recv;
cmd qq|[con_id="$first"] focus|;
cmd 'open';
$content = get_ws_content($tmp);
ok(@{$content} == 3, 'three containers opened');
@ -35,6 +34,4 @@ is($content->[0]->{id}, $first, 'first container unmodified');
isnt($content->[1]->{id}, $second, 'second container replaced');
is($content->[2]->{id}, $second, 'third container unmodified');
diag( "Testing i3, Perl $], $^X" );
#
done_testing;