From d3f5ed8956e52a6ecbb0230a76f3e1b24c70dc1e Mon Sep 17 00:00:00 2001 From: Kent Fredric Date: Fri, 10 Mar 2017 05:08:26 +1300 Subject: [PATCH] Make tests work on older test::More --- Changes | 1 + t/01_test.t | 3 +-- t/0200_firstparent.t | 4 +--- t/0201_firstparent_fromhead.t | 4 +--- t/03_callback.t | 4 +--- t/04_list.t | 4 +--- 6 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Changes b/Changes index 142e25f..2ddea9e 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,7 @@ Release history for Git-PurePerl-Walker {{$NEXT}} - Bugfix: Avoid test failures with -Ddefault_inc_excludes_dot + - Tests made more portable to older Test::More [Dependencies::Stats] - Dependencies changed since 0.004000, see misc/*.deps* for details diff --git a/t/01_test.t b/t/01_test.t index bd09680..2517020 100644 --- a/t/01_test.t +++ b/t/01_test.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More; +use Test::More tests => 2; use FindBin; use Path::Tiny qw(path); @@ -39,4 +39,3 @@ is_deeply( ], 'Traverse whole tree' ); -done_testing; diff --git a/t/0200_firstparent.t b/t/0200_firstparent.t index 7edb364..5455ebf 100644 --- a/t/0200_firstparent.t +++ b/t/0200_firstparent.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More; +use Test::More tests => 9; use FindBin; use Path::Tiny qw(path); @@ -29,5 +29,3 @@ is( $method->_commit->sha1, $expected->{'HEAD~1'}, 'At Head~1' ); is( $method->current->sha1, $expected->{'HEAD~1'}, 'At Head~1' ); is( $method->start, $expected->{'HEAD'}, 'At Head' ); ok( !$method->has_next, "Has no more items" ); - -done_testing; diff --git a/t/0201_firstparent_fromhead.t b/t/0201_firstparent_fromhead.t index a0af0fb..e6a3682 100644 --- a/t/0201_firstparent_fromhead.t +++ b/t/0201_firstparent_fromhead.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More; +use Test::More tests => 9; use FindBin; use Path::Tiny qw( path ); @@ -29,5 +29,3 @@ is( $method->_commit->sha1, $expected->{'HEAD~1'}, 'At Head~1' ); is( $method->current->sha1, $expected->{'HEAD~1'}, 'At Head~1' ); is( $method->start, $expected->{'HEAD'}, 'At Head' ); ok( !$method->has_next, "Has no more items" ); - -done_testing; diff --git a/t/03_callback.t b/t/03_callback.t index 24014be..c9e7088 100644 --- a/t/03_callback.t +++ b/t/03_callback.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More; +use Test::More tests => 1; use FindBin; use Path::Tiny qw(path); @@ -28,5 +28,3 @@ my $caller = $caller_factory->for_repository($repo); $caller->handle( $repo->master ); is( $v->[0]->sha1, '010fb4bcf7d92c031213f43d0130c811cbb355e7', 'Callback triggered' ); - -done_testing; diff --git a/t/04_list.t b/t/04_list.t index 39bd7cc..fd1e3ee 100644 --- a/t/04_list.t +++ b/t/04_list.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More; +use Test::More tests => 5; use FindBin; use Path::Tiny qw(path); use Scalar::Util qw( refaddr ); @@ -53,5 +53,3 @@ my $c = Git::PurePerl::Walker::OnCommit::CallBack->new( ); $li->add_event($c); isnt( refaddr $li->events->[2], refaddr $c, "callback is cloned x3" ); - -done_testing;