'AnyEvent' => 0,
'AnyEvent::I3' => '0.09',
'X11::XCB' => '0.03',
- 'Test::Most' => 0,
- 'Test::Deep' => 0,
'EV' => 0,
'Inline' => 0,
},
my $class = shift;
my $pkg = caller;
- my $test_most_args = @_ ? "qw(@_)" : "";
+ my $test_more_args = @_ ? "qw(@_)" : "";
local $@;
eval << "__";
package $pkg;
-use Test::Most $test_most_args;
+use Test::More $test_more_args;
use Data::Dumper;
use AnyEvent::I3;
use Time::HiRes qw(sleep);
-use Test::Deep qw(eq_deeply cmp_deeply);
__
$tester->bail_out("$@") if $@;
feature->import(":5.10");
sleep(0.25);
my $new_rect = $window->rect;
-ok(!eq_deeply($new_rect, $original_rect), "Window got repositioned");
+ok(!eq_hash($new_rect, $original_rect), "Window got repositioned");
done_testing;
cmd 'open';
my $new_rect = $window->rect;
-ok(!eq_deeply($new_rect, $original_rect), "Window got repositioned");
+ok(!eq_hash($new_rect, $original_rect), "Window got repositioned");
$original_rect = $new_rect;
$window->fullscreen(1);
sync_with_i3;
$new_rect = $window->rect;
-ok(!eq_deeply($new_rect, $original_rect), "Window got repositioned after fullscreen");
+ok(!eq_hash($new_rect, $original_rect), "Window got repositioned after fullscreen");
my $orect = $output->{rect};
my $wrect = $new_rect;
wait_for_map $window;
$new_rect = $window->rect;
-ok(!eq_deeply($new_rect, $original_rect), "Window got repositioned after fullscreen");
+ok(!eq_hash($new_rect, $original_rect), "Window got repositioned after fullscreen");
ok($window->mapped, "Window is mapped after opening it in fullscreen mode");
$wrect = $new_rect;
ok(!$swindow->mapped, 'window not mapped while fullscreen window active');
$new_rect = $swindow->rect;
-ok(!eq_deeply($new_rect, $original_rect), "Window got repositioned");
+ok(!eq_hash($new_rect, $original_rect), "Window got repositioned");
$swindow->fullscreen(1);
sync_with_i3;
'floating_nodes' => ignore(),
};
-cmp_deeply($tree, $expected, 'root node OK');
+is_deeply($tree, $expected, 'root node OK');
my @nodes = @{$tree->{nodes}};
my @nums = map { $_->{num} } grep { defined($_->{num}) } @ws;
my @sorted = sort @nums;
- cmp_deeply(\@nums, \@sorted, $msg);
+ is_deeply(\@nums, \@sorted, $msg);
}
check_order('workspace order alright before testing');
my @nums = map { $_->{num} } grep { defined($_->{num}) } @ws;
my @sorted = sort @nums;
- cmp_deeply(\@nums, \@sorted, $msg);
+ is_deeply(\@nums, \@sorted, $msg);
}
my $tmp = fresh_workspace;
my $pid = launch_with_config($config);
my @names = @{get_workspace_names()};
-cmp_deeply(\@names, [ '1' ], 'i3 starts on workspace 1 without any configuration');
+is_deeply(\@names, [ '1' ], 'i3 starts on workspace 1 without any configuration');
exit_gracefully($pid);
$pid = launch_with_config($config);
@names = @{get_workspace_names()};
-cmp_deeply(\@names, [ 'foobar' ], 'i3 starts on named workspace foobar');
+is_deeply(\@names, [ 'foobar' ], 'i3 starts on named workspace foobar');
exit_gracefully($pid);
$pid = launch_with_config($config);
@names = @{get_workspace_names()};
-cmp_deeply(\@names, [ 'foobar' ], 'i3 starts on named workspace foobar');
+is_deeply(\@names, [ 'foobar' ], 'i3 starts on named workspace foobar');
exit_gracefully($pid);
my $tmp = fresh_workspace;
my $marks = get_marks();
-cmp_deeply($marks, [], 'no marks set so far');
+is_deeply($marks, [], 'no marks set so far');
##############################################################
# 2: check that setting a mark is reflected in the get_marks reply
cmd 'open';
cmd 'mark foo';
-cmp_deeply(get_marks(), [ 'foo' ], 'mark foo set');
+is_deeply(get_marks(), [ 'foo' ], 'mark foo set');
##############################################################
# 3: check that the mark is gone after killing the container
cmd 'kill';
-cmp_deeply(get_marks(), [ ], 'mark gone');
+is_deeply(get_marks(), [ ], 'mark gone');
##############################################################
# 4: check that duplicate marks are included twice in the get_marks reply
cmd 'open';
cmd 'mark bar';
-cmp_deeply(get_marks(), [ 'bar', 'bar' ], 'duplicate mark found twice');
+is_deeply(get_marks(), [ 'bar', 'bar' ], 'duplicate mark found twice');
done_testing;