This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Test::Harness 3.14
[perl5.git] / ext / Test / Harness / t / state.t
index e6bfb7c..2808637 100644 (file)
@@ -13,6 +13,7 @@ BEGIN {
 use strict;
 use Test::More;
 use App::Prove::State;
 use strict;
 use Test::More;
 use App::Prove::State;
+use App::Prove::State::Result;
 
 sub mn {
     my $pfx = $ENV{PERL_CORE} ? '../ext/Test/Harness/' : '';
 
 sub mn {
     my $pfx = $ENV{PERL_CORE} ? '../ext/Test/Harness/' : '';
@@ -150,6 +151,13 @@ my @schedule = (
             't/source.t',
         ],
     },
             't/source.t',
         ],
     },
+    {   options        => 'fresh',
+        get_tests_args => [],
+        expect         => [
+            't/compat/env.t',
+            't/compat/failure.t',
+        ],
+    },
 );
 
 plan tests => @schedule * 2;
 );
 
 plan tests => @schedule * 2;
@@ -175,78 +183,80 @@ for my $test (@schedule) {
 }
 
 sub get_state {
 }
 
 sub get_state {
-    return {
-        'generation' => '51',
-        'tests'      => {
-            mn('t/compat/failure.t') => {
-                'last_result'    => '0',
-                'last_run_time'  => '1196371471.57738',
-                'last_pass_time' => '1196371471.57738',
-                'total_passes'   => '48',
-                'seq'            => '1549',
-                'gen'            => '51',
-                'elapsed'        => 0.1230,
-                'last_todo'      => '1',
-                'mtime'          => 1196285623,
-            },
-            mn('t/yamlish-writer.t') => {
-                'last_result'    => '0',
-                'last_run_time'  => '1196371480.5761',
-                'last_pass_time' => '1196371480.5761',
-                'last_fail_time' => '1196368609',
-                'total_passes'   => '41',
-                'seq'            => '1578',
-                'gen'            => '49',
-                'elapsed'        => 12.2983,
-                'last_todo'      => '0',
-                'mtime'          => 1196285400,
-            },
-            mn('t/compat/env.t') => {
-                'last_result'    => '0',
-                'last_run_time'  => '1196371471.42967',
-                'last_pass_time' => '1196371471.42967',
-                'last_fail_time' => '1196368608',
-                'total_passes'   => '48',
-                'seq'            => '1548',
-                'gen'            => '52',
-                'elapsed'        => 3.1290,
-                'last_todo'      => '0',
-                'mtime'          => 1196285739,
-            },
-            mn('t/compat/version.t') => {
-                'last_result'    => '2',
-                'last_run_time'  => '1196371472.96476',
-                'last_pass_time' => '1196371472.96476',
-                'last_fail_time' => '1196368609',
-                'total_passes'   => '47',
-                'seq'            => '1555',
-                'gen'            => '51',
-                'elapsed'        => 0.2363,
-                'last_todo'      => '4',
-                'mtime'          => 1196285239,
-            },
-            mn('t/compat/inc_taint.t') => {
-                'last_result'    => '3',
-                'last_run_time'  => '1196371471.89682',
-                'last_pass_time' => '1196371471.89682',
-                'total_passes'   => '47',
-                'seq'            => '1551',
-                'gen'            => '51',
-                'elapsed'        => 1.6938,
-                'last_todo'      => '0',
-                'mtime'          => 1196185639,
-            },
-            mn('t/source.t') => {
-                'last_result'    => '0',
-                'last_run_time'  => '1196371479.72508',
-                'last_pass_time' => '1196371479.72508',
-                'total_passes'   => '41',
-                'seq'            => '1570',
-                'gen'            => '51',
-                'elapsed'        => 0.0143,
-                'last_todo'      => '0',
-                'mtime'          => 1186285639,
-            },
+    return App::Prove::State::Result->new(
+        {   generation    => 51,
+            last_run_time => 1196285439,
+            tests         => {
+                mn('t/compat/failure.t') => {
+                    last_result    => 0,
+                    last_run_time  => 1196371471.57738,
+                    last_pass_time => 1196371471.57738,
+                    total_passes   => 48,
+                    seq            => 1549,
+                    gen            => 51,
+                    elapsed        => 0.1230,
+                    last_todo      => 1,
+                    mtime          => 1196285623,
+                },
+                mn('t/yamlish-writer.t') => {
+                    last_result    => 0,
+                    last_run_time  => 1196371480.5761,
+                    last_pass_time => 1196371480.5761,
+                    last_fail_time => 1196368609,
+                    total_passes   => 41,
+                    seq            => 1578,
+                    gen            => 49,
+                    elapsed        => 12.2983,
+                    last_todo      => 0,
+                    mtime          => 1196285400,
+                },
+                mn('t/compat/env.t') => {
+                    last_result    => 0,
+                    last_run_time  => 1196371471.42967,
+                    last_pass_time => 1196371471.42967,
+                    last_fail_time => 1196368608,
+                    total_passes   => 48,
+                    seq            => 1548,
+                    gen            => 52,
+                    elapsed        => 3.1290,
+                    last_todo      => 0,
+                    mtime          => 1196285739,
+                },
+                mn('t/compat/version.t') => {
+                    last_result    => 2,
+                    last_run_time  => 1196371472.96476,
+                    last_pass_time => 1196371472.96476,
+                    last_fail_time => 1196368609,
+                    total_passes   => 47,
+                    seq            => 1555,
+                    gen            => 51,
+                    elapsed        => 0.2363,
+                    last_todo      => 4,
+                    mtime          => 1196285239,
+                },
+                mn('t/compat/inc_taint.t') => {
+                    last_result    => 3,
+                    last_run_time  => 1196371471.89682,
+                    last_pass_time => 1196371471.89682,
+                    total_passes   => 47,
+                    seq            => 1551,
+                    gen            => 51,
+                    elapsed        => 1.6938,
+                    last_todo      => 0,
+                    mtime          => 1196185639,
+                },
+                mn('t/source.t') => {
+                    last_result    => 0,
+                    last_run_time  => 1196371479.72508,
+                    last_pass_time => 1196371479.72508,
+                    total_passes   => 41,
+                    seq            => 1570,
+                    gen            => 51,
+                    elapsed        => 0.0143,
+                    last_todo      => 0,
+                    mtime          => 1186285639,
+                },
+            }
         }
         }
-    };
+    );
 }
 }