diff --git a/testcases/Makefile.PL b/testcases/Makefile.PL index fd7b5e0d..f82aa856 100755 --- a/testcases/Makefile.PL +++ b/testcases/Makefile.PL @@ -10,8 +10,6 @@ WriteMakefile( 'AnyEvent' => 0, 'AnyEvent::I3' => '0.09', 'X11::XCB' => '0.03', - 'Test::Most' => 0, - 'Test::Deep' => 0, 'EV' => 0, 'Inline' => 0, }, diff --git a/testcases/lib/i3test.pm b/testcases/lib/i3test.pm index 44ce7f23..fb2b1cf5 100644 --- a/testcases/lib/i3test.pm +++ b/testcases/lib/i3test.pm @@ -61,15 +61,14 @@ sub import { 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"); diff --git a/testcases/t/001-tile.t b/testcases/t/001-tile.t index 066bc640..460cbd90 100644 --- a/testcases/t/001-tile.t +++ b/testcases/t/001-tile.t @@ -21,6 +21,6 @@ $window->map; 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; diff --git a/testcases/t/100-fullscreen.t b/testcases/t/100-fullscreen.t index dc7eec18..4a8f87a7 100644 --- a/testcases/t/100-fullscreen.t +++ b/testcases/t/100-fullscreen.t @@ -51,7 +51,7 @@ wait_for_map $window; 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); @@ -59,7 +59,7 @@ $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; @@ -98,7 +98,7 @@ $window->map; 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; @@ -128,7 +128,7 @@ sync_with_i3; 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; diff --git a/testcases/t/116-nestedcons.t b/testcases/t/116-nestedcons.t index 4b3958a1..ada6e0dc 100644 --- a/testcases/t/116-nestedcons.t +++ b/testcases/t/116-nestedcons.t @@ -50,7 +50,7 @@ my $expected = { 'floating_nodes' => ignore(), }; -cmp_deeply($tree, $expected, 'root node OK'); +is_deeply($tree, $expected, 'root node OK'); my @nodes = @{$tree->{nodes}}; diff --git a/testcases/t/139-ws-numbers.t b/testcases/t/139-ws-numbers.t index aac1debf..78b9191a 100644 --- a/testcases/t/139-ws-numbers.t +++ b/testcases/t/139-ws-numbers.t @@ -13,7 +13,7 @@ sub check_order { 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'); diff --git a/testcases/t/140-focus-lost.t b/testcases/t/140-focus-lost.t index 2d3c1570..3d78b1bd 100644 --- a/testcases/t/140-focus-lost.t +++ b/testcases/t/140-focus-lost.t @@ -13,7 +13,7 @@ sub check_order { 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; diff --git a/testcases/t/172-start-on-named-ws.t b/testcases/t/172-start-on-named-ws.t index 97ae16e9..34d98776 100644 --- a/testcases/t/172-start-on-named-ws.t +++ b/testcases/t/172-start-on-named-ws.t @@ -18,7 +18,7 @@ EOT 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); @@ -36,7 +36,7 @@ EOT $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); @@ -54,7 +54,7 @@ EOT $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); diff --git a/testcases/t/173-get-marks.t b/testcases/t/173-get-marks.t index e74c233a..75b6e7a8 100644 --- a/testcases/t/173-get-marks.t +++ b/testcases/t/173-get-marks.t @@ -16,7 +16,7 @@ sub get_marks { 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 @@ -25,7 +25,7 @@ cmp_deeply($marks, [], 'no marks set so far'); 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 @@ -33,7 +33,7 @@ cmp_deeply(get_marks(), [ 'foo' ], 'mark foo set'); 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 @@ -45,6 +45,6 @@ cmd 'mark bar'; 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;