Upgrade to Test::Harness 3.14
[p5sagit/p5-mst-13.2.git] / ext / Test / Harness / t / compat / test-harness-compat.t
1 #!/usr/bin/perl -w
2
3 BEGIN {
4     if ( $ENV{PERL_CORE} ) {
5         chdir 't';
6         @INC = '../lib';
7     }
8     else {
9         unshift @INC, 't/lib';
10     }
11 }
12
13 use strict;
14
15 # use lib 't/lib';
16
17 use Test::More;
18 use File::Spec;
19 use Test::Harness qw(execute_tests);
20
21 # unset this global when self-testing ('testcover' and etc issue)
22 local $ENV{HARNESS_PERL_SWITCHES};
23
24 my $TEST_DIR
25   = $ENV{PERL_CORE} ? '../ext/Test/Harness/t/sample-tests' : 't/sample-tests';
26
27 {
28
29     # if the harness wants to save the resulting TAP we shouldn't
30     # do it for our internal calls
31     local $ENV{PERL_TEST_HARNESS_DUMP_TAP} = 0;
32
33     my $PER_LOOP = 4;
34
35     my $results = {
36         'descriptive' => {
37             'failed' => {},
38             'todo'   => {},
39             'totals' => {
40                 'bad'         => 0,
41                 'bonus'       => 0,
42                 'files'       => 1,
43                 'good'        => 1,
44                 'max'         => 5,
45                 'ok'          => 5,
46                 'skipped'     => 0,
47                 'sub_skipped' => 0,
48                 'tests'       => 1,
49                 'todo'        => 0
50             }
51         },
52         join(
53             ',', qw(
54               descriptive die die_head_end die_last_minute duplicates
55               head_end head_fail inc_taint junk_before_plan lone_not_bug
56               no_nums no_output schwern sequence_misparse shbang_misparse
57               simple simple_fail skip skip_nomsg skipall skipall_nomsg
58               stdout_stderr taint todo_inline
59               todo_misparse too_many vms_nit
60               )
61           ) => {
62             'failed' => {
63                 "$TEST_DIR/die" => {
64                     'canon'  => '??',
65                     'estat'  => 1,
66                     'failed' => '??',
67                     'max'    => '??',
68                     'name'   => "$TEST_DIR/die",
69                     'wstat'  => '256'
70                 },
71                 "$TEST_DIR/die_head_end" => {
72                     'canon'  => '??',
73                     'estat'  => 1,
74                     'failed' => '??',
75                     'max'    => '??',
76                     'name'   => "$TEST_DIR/die_head_end",
77                     'wstat'  => '256'
78                 },
79                 "$TEST_DIR/die_last_minute" => {
80                     'canon'  => '??',
81                     'estat'  => 1,
82                     'failed' => 0,
83                     'max'    => 4,
84                     'name'   => "$TEST_DIR/die_last_minute",
85                     'wstat'  => '256'
86                 },
87                 "$TEST_DIR/duplicates" => {
88                     'canon'  => '??',
89                     'estat'  => '',
90                     'failed' => '??',
91                     'max'    => 10,
92                     'name'   => "$TEST_DIR/duplicates",
93                     'wstat'  => ''
94                 },
95                 "$TEST_DIR/head_fail" => {
96                     'canon'  => 2,
97                     'estat'  => '',
98                     'failed' => 1,
99                     'max'    => 4,
100                     'name'   => "$TEST_DIR/head_fail",
101                     'wstat'  => ''
102                 },
103                 "$TEST_DIR/inc_taint" => {
104                     'canon'  => 1,
105                     'estat'  => 1,
106                     'failed' => 1,
107                     'max'    => 1,
108                     'name'   => "$TEST_DIR/inc_taint",
109                     'wstat'  => '256'
110                 },
111                 "$TEST_DIR/no_nums" => {
112                     'canon'  => 3,
113                     'estat'  => '',
114                     'failed' => 1,
115                     'max'    => 5,
116                     'name'   => "$TEST_DIR/no_nums",
117                     'wstat'  => ''
118                 },
119                 "$TEST_DIR/no_output" => {
120                     'canon'  => '??',
121                     'estat'  => '',
122                     'failed' => '??',
123                     'max'    => '??',
124                     'name'   => "$TEST_DIR/no_output",
125                     'wstat'  => ''
126                 },
127                 "$TEST_DIR/simple_fail" => {
128                     'canon'  => '2 5',
129                     'estat'  => '',
130                     'failed' => 2,
131                     'max'    => 5,
132                     'name'   => "$TEST_DIR/simple_fail",
133                     'wstat'  => ''
134                 },
135                 "$TEST_DIR/todo_misparse" => {
136                     'canon'  => 1,
137                     'estat'  => '',
138                     'failed' => 1,
139                     'max'    => 1,
140                     'name'   => "$TEST_DIR/todo_misparse",
141                     'wstat'  => ''
142                 },
143                 "$TEST_DIR/too_many" => {
144                     'canon'  => '4-7',
145                     'estat'  => 4,
146                     'failed' => 4,
147                     'max'    => 3,
148                     'name'   => "$TEST_DIR/too_many",
149                     'wstat'  => '1024'
150                 },
151                 "$TEST_DIR/vms_nit" => {
152                     'canon'  => 1,
153                     'estat'  => '',
154                     'failed' => 1,
155                     'max'    => 2,
156                     'name'   => "$TEST_DIR/vms_nit",
157                     'wstat'  => ''
158                 }
159             },
160             'todo' => {
161                 "$TEST_DIR/todo_inline" => {
162                     'canon'  => 2,
163                     'estat'  => '',
164                     'failed' => 1,
165                     'max'    => 2,
166                     'name'   => "$TEST_DIR/todo_inline",
167                     'wstat'  => ''
168                 }
169             },
170             'totals' => {
171                 'bad'         => 12,
172                 'bonus'       => 1,
173                 'files'       => 27,
174                 'good'        => 15,
175                 'max'         => 76,
176                 'ok'          => 78,
177                 'skipped'     => 2,
178                 'sub_skipped' => 2,
179                 'tests'       => 27,
180                 'todo'        => 2
181             }
182           },
183         'die' => {
184             'failed' => {
185                 "$TEST_DIR/die" => {
186                     'canon'  => '??',
187                     'estat'  => 1,
188                     'failed' => '??',
189                     'max'    => '??',
190                     'name'   => "$TEST_DIR/die",
191                     'wstat'  => '256'
192                 }
193             },
194             'todo'   => {},
195             'totals' => {
196                 'bad'         => 1,
197                 'bonus'       => 0,
198                 'files'       => 1,
199                 'good'        => 0,
200                 'max'         => 0,
201                 'ok'          => 0,
202                 'skipped'     => 0,
203                 'sub_skipped' => 0,
204                 'tests'       => 1,
205                 'todo'        => 0
206             }
207         },
208         'die_head_end' => {
209             'failed' => {
210                 "$TEST_DIR/die_head_end" => {
211                     'canon'  => '??',
212                     'estat'  => 1,
213                     'failed' => '??',
214                     'max'    => '??',
215                     'name'   => "$TEST_DIR/die_head_end",
216                     'wstat'  => '256'
217                 }
218             },
219             'todo'   => {},
220             'totals' => {
221                 'bad'         => 1,
222                 'bonus'       => 0,
223                 'files'       => 1,
224                 'good'        => 0,
225                 'max'         => 0,
226                 'ok'          => 4,
227                 'skipped'     => 0,
228                 'sub_skipped' => 0,
229                 'tests'       => 1,
230                 'todo'        => 0
231             }
232         },
233         'die_last_minute' => {
234             'failed' => {
235                 "$TEST_DIR/die_last_minute" => {
236                     'canon'  => '??',
237                     'estat'  => 1,
238                     'failed' => 0,
239                     'max'    => 4,
240                     'name'   => "$TEST_DIR/die_last_minute",
241                     'wstat'  => '256'
242                 }
243             },
244             'todo'   => {},
245             'totals' => {
246                 'bad'         => 1,
247                 'bonus'       => 0,
248                 'files'       => 1,
249                 'good'        => 0,
250                 'max'         => 4,
251                 'ok'          => 4,
252                 'skipped'     => 0,
253                 'sub_skipped' => 0,
254                 'tests'       => 1,
255                 'todo'        => 0
256             }
257         },
258         'duplicates' => {
259             'failed' => {
260                 "$TEST_DIR/duplicates" => {
261                     'canon'  => '??',
262                     'estat'  => '',
263                     'failed' => '??',
264                     'max'    => 10,
265                     'name'   => "$TEST_DIR/duplicates",
266                     'wstat'  => ''
267                 }
268             },
269             'todo'   => {},
270             'totals' => {
271                 'bad'         => 1,
272                 'bonus'       => 0,
273                 'files'       => 1,
274                 'good'        => 0,
275                 'max'         => 10,
276                 'ok'          => 11,
277                 'skipped'     => 0,
278                 'sub_skipped' => 0,
279                 'tests'       => 1,
280                 'todo'        => 0
281             }
282         },
283         'head_end' => {
284             'failed' => {},
285             'todo'   => {},
286             'totals' => {
287                 'bad'         => 0,
288                 'bonus'       => 0,
289                 'files'       => 1,
290                 'good'        => 1,
291                 'max'         => 4,
292                 'ok'          => 4,
293                 'skipped'     => 0,
294                 'sub_skipped' => 0,
295                 'tests'       => 1,
296                 'todo'        => 0
297             }
298         },
299         'head_fail' => {
300             'failed' => {
301                 "$TEST_DIR/head_fail" => {
302                     'canon'  => 2,
303                     'estat'  => '',
304                     'failed' => 1,
305                     'max'    => 4,
306                     'name'   => "$TEST_DIR/head_fail",
307                     'wstat'  => ''
308                 }
309             },
310             'todo'   => {},
311             'totals' => {
312                 'bad'         => 1,
313                 'bonus'       => 0,
314                 'files'       => 1,
315                 'good'        => 0,
316                 'max'         => 4,
317                 'ok'          => 3,
318                 'skipped'     => 0,
319                 'sub_skipped' => 0,
320                 'tests'       => 1,
321                 'todo'        => 0
322             }
323         },
324         'inc_taint' => {
325             'failed' => {
326                 "$TEST_DIR/inc_taint" => {
327                     'canon'  => 1,
328                     'estat'  => 1,
329                     'failed' => 1,
330                     'max'    => 1,
331                     'name'   => "$TEST_DIR/inc_taint",
332                     'wstat'  => '256'
333                 }
334             },
335             'todo'   => {},
336             'totals' => {
337                 'bad'         => 1,
338                 'bonus'       => 0,
339                 'files'       => 1,
340                 'good'        => 0,
341                 'max'         => 1,
342                 'ok'          => 0,
343                 'skipped'     => 0,
344                 'sub_skipped' => 0,
345                 'tests'       => 1,
346                 'todo'        => 0
347             }
348         },
349         'junk_before_plan' => {
350             'failed' => {},
351             'todo'   => {},
352             'totals' => {
353                 'bad'         => 0,
354                 'bonus'       => 0,
355                 'files'       => 1,
356                 'good'        => 1,
357                 'max'         => 1,
358                 'ok'          => 1,
359                 'skipped'     => 0,
360                 'sub_skipped' => 0,
361                 'tests'       => 1,
362                 'todo'        => 0
363             }
364         },
365         'lone_not_bug' => {
366             'failed' => {},
367             'todo'   => {},
368             'totals' => {
369                 'bad'         => 0,
370                 'bonus'       => 0,
371                 'files'       => 1,
372                 'good'        => 1,
373                 'max'         => 4,
374                 'ok'          => 4,
375                 'skipped'     => 0,
376                 'sub_skipped' => 0,
377                 'tests'       => 1,
378                 'todo'        => 0
379             }
380         },
381         'no_nums' => {
382             'failed' => {
383                 "$TEST_DIR/no_nums" => {
384                     'canon'  => 3,
385                     'estat'  => '',
386                     'failed' => 1,
387                     'max'    => 5,
388                     'name'   => "$TEST_DIR/no_nums",
389                     'wstat'  => ''
390                 }
391             },
392             'todo'   => {},
393             'totals' => {
394                 'bad'         => 1,
395                 'bonus'       => 0,
396                 'files'       => 1,
397                 'good'        => 0,
398                 'max'         => 5,
399                 'ok'          => 4,
400                 'skipped'     => 0,
401                 'sub_skipped' => 0,
402                 'tests'       => 1,
403                 'todo'        => 0
404             }
405         },
406         'no_output' => {
407             'failed' => {
408                 "$TEST_DIR/no_output" => {
409                     'canon'  => '??',
410                     'estat'  => '',
411                     'failed' => '??',
412                     'max'    => '??',
413                     'name'   => "$TEST_DIR/no_output",
414                     'wstat'  => ''
415                 }
416             },
417             'todo'   => {},
418             'totals' => {
419                 'bad'         => 1,
420                 'bonus'       => 0,
421                 'files'       => 1,
422                 'good'        => 0,
423                 'max'         => 0,
424                 'ok'          => 0,
425                 'skipped'     => 0,
426                 'sub_skipped' => 0,
427                 'tests'       => 1,
428                 'todo'        => 0
429             }
430         },
431         'schwern' => {
432             'failed' => {},
433             'todo'   => {},
434             'totals' => {
435                 'bad'         => 0,
436                 'bonus'       => 0,
437                 'files'       => 1,
438                 'good'        => 1,
439                 'max'         => 1,
440                 'ok'          => 1,
441                 'skipped'     => 0,
442                 'sub_skipped' => 0,
443                 'tests'       => 1,
444                 'todo'        => 0
445             }
446         },
447         'sequence_misparse' => {
448             'failed' => {},
449             'todo'   => {},
450             'totals' => {
451                 'bad'         => 0,
452                 'bonus'       => 0,
453                 'files'       => 1,
454                 'good'        => 1,
455                 'max'         => 5,
456                 'ok'          => 5,
457                 'skipped'     => 0,
458                 'sub_skipped' => 0,
459                 'tests'       => 1,
460                 'todo'        => 0
461             }
462         },
463         'shbang_misparse' => {
464             'failed' => {},
465             'todo'   => {},
466             'totals' => {
467                 'bad'         => 0,
468                 'bonus'       => 0,
469                 'files'       => 1,
470                 'good'        => 1,
471                 'max'         => 2,
472                 'ok'          => 2,
473                 'skipped'     => 0,
474                 'sub_skipped' => 0,
475                 'tests'       => 1,
476                 'todo'        => 0
477             }
478         },
479         'simple' => {
480             'failed' => {},
481             'todo'   => {},
482             'totals' => {
483                 'bad'         => 0,
484                 'bonus'       => 0,
485                 'files'       => 1,
486                 'good'        => 1,
487                 'max'         => 5,
488                 'ok'          => 5,
489                 'skipped'     => 0,
490                 'sub_skipped' => 0,
491                 'tests'       => 1,
492                 'todo'        => 0
493             }
494         },
495         'simple_fail' => {
496             'failed' => {
497                 "$TEST_DIR/simple_fail" => {
498                     'canon'  => '2 5',
499                     'estat'  => '',
500                     'failed' => 2,
501                     'max'    => 5,
502                     'name'   => "$TEST_DIR/simple_fail",
503                     'wstat'  => ''
504                 }
505             },
506             'todo'   => {},
507             'totals' => {
508                 'bad'         => 1,
509                 'bonus'       => 0,
510                 'files'       => 1,
511                 'good'        => 0,
512                 'max'         => 5,
513                 'ok'          => 3,
514                 'skipped'     => 0,
515                 'sub_skipped' => 0,
516                 'tests'       => 1,
517                 'todo'        => 0
518             }
519         },
520         'skip' => {
521             'failed' => {},
522             'todo'   => {},
523             'totals' => {
524                 'bad'         => 0,
525                 'bonus'       => 0,
526                 'files'       => 1,
527                 'good'        => 1,
528                 'max'         => 5,
529                 'ok'          => 5,
530                 'skipped'     => 0,
531                 'sub_skipped' => 1,
532                 'tests'       => 1,
533                 'todo'        => 0
534             }
535         },
536         'skip_nomsg' => {
537             'failed' => {},
538             'todo'   => {},
539             'totals' => {
540                 'bad'         => 0,
541                 'bonus'       => 0,
542                 'files'       => 1,
543                 'good'        => 1,
544                 'max'         => 1,
545                 'ok'          => 1,
546                 'skipped'     => 0,
547                 'sub_skipped' => 1,
548                 'tests'       => 1,
549                 'todo'        => 0
550             }
551         },
552         'skipall' => {
553             'failed' => {},
554             'todo'   => {},
555             'totals' => {
556                 'bad'         => 0,
557                 'bonus'       => 0,
558                 'files'       => 1,
559                 'good'        => 1,
560                 'max'         => 0,
561                 'ok'          => 0,
562                 'skipped'     => 1,
563                 'sub_skipped' => 0,
564                 'tests'       => 1,
565                 'todo'        => 0
566             }
567         },
568         'skipall_nomsg' => {
569             'failed' => {},
570             'todo'   => {},
571             'totals' => {
572                 'bad'         => 0,
573                 'bonus'       => 0,
574                 'files'       => 1,
575                 'good'        => 1,
576                 'max'         => 0,
577                 'ok'          => 0,
578                 'skipped'     => 1,
579                 'sub_skipped' => 0,
580                 'tests'       => 1,
581                 'todo'        => 0
582             }
583         },
584         'stdout_stderr' => {
585             'failed' => {},
586             'todo'   => {},
587             'totals' => {
588                 'bad'         => 0,
589                 'bonus'       => 0,
590                 'files'       => 1,
591                 'good'        => 1,
592                 'max'         => 4,
593                 'ok'          => 4,
594                 'skipped'     => 0,
595                 'sub_skipped' => 0,
596                 'tests'       => 1,
597                 'todo'        => 0
598             }
599         },
600         'switches' => {
601             'skip_if' => sub {
602                 ( $ENV{PERL5OPT} || '' ) =~ m{(?:^|\s)-[dM]};
603             },
604             'failed' => {
605                 "$TEST_DIR/switches" => {
606                     'canon'  => 1,
607                     'estat'  => '',
608                     'failed' => 1,
609                     'max'    => 1,
610                     'name'   => "$TEST_DIR/switches",
611                     'wstat'  => ''
612                 }
613             },
614             'todo'   => {},
615             'totals' => {
616                 'bad'         => 1,
617                 'bonus'       => 0,
618                 'files'       => 1,
619                 'good'        => 0,
620                 'max'         => 1,
621                 'ok'          => 0,
622                 'skipped'     => 0,
623                 'sub_skipped' => 0,
624                 'tests'       => 1,
625                 'todo'        => 0
626             }
627         },
628         'taint' => {
629             'failed' => {},
630             'todo'   => {},
631             'totals' => {
632                 'bad'         => 0,
633                 'bonus'       => 0,
634                 'files'       => 1,
635                 'good'        => 1,
636                 'max'         => 1,
637                 'ok'          => 1,
638                 'skipped'     => 0,
639                 'sub_skipped' => 0,
640                 'tests'       => 1,
641                 'todo'        => 0
642             }
643         },
644         'taint_warn' => {
645             'failed' => {},
646             'todo'   => {},
647             'totals' => {
648                 'bad'         => 0,
649                 'bonus'       => 0,
650                 'files'       => 1,
651                 'good'        => 1,
652                 'max'         => 1,
653                 'ok'          => 1,
654                 'skipped'     => 0,
655                 'sub_skipped' => 0,
656                 'tests'       => 1,
657                 'todo'        => 0
658             },
659             'require' => 5.008001,
660         },
661         'todo_inline' => {
662             'failed' => {},
663             'todo'   => {
664                 "$TEST_DIR/todo_inline" => {
665                     'canon'  => 2,
666                     'estat'  => '',
667                     'failed' => 1,
668                     'max'    => 2,
669                     'name'   => "$TEST_DIR/todo_inline",
670                     'wstat'  => ''
671                 }
672             },
673             'totals' => {
674                 'bad'         => 0,
675                 'bonus'       => 1,
676                 'files'       => 1,
677                 'good'        => 1,
678                 'max'         => 3,
679                 'ok'          => 3,
680                 'skipped'     => 0,
681                 'sub_skipped' => 0,
682                 'tests'       => 1,
683                 'todo'        => 2
684             }
685         },
686         'todo_misparse' => {
687             'failed' => {
688                 "$TEST_DIR/todo_misparse" => {
689                     'canon'  => 1,
690                     'estat'  => '',
691                     'failed' => 1,
692                     'max'    => 1,
693                     'name'   => "$TEST_DIR/todo_misparse",
694                     'wstat'  => ''
695                 }
696             },
697             'todo'   => {},
698             'totals' => {
699                 'bad'         => 1,
700                 'bonus'       => 0,
701                 'files'       => 1,
702                 'good'        => 0,
703                 'max'         => 1,
704                 'ok'          => 0,
705                 'skipped'     => 0,
706                 'sub_skipped' => 0,
707                 'tests'       => 1,
708                 'todo'        => 0
709             }
710         },
711         'too_many' => {
712             'failed' => {
713                 "$TEST_DIR/too_many" => {
714                     'canon'  => '4-7',
715                     'estat'  => 4,
716                     'failed' => 4,
717                     'max'    => 3,
718                     'name'   => "$TEST_DIR/too_many",
719                     'wstat'  => '1024'
720                 }
721             },
722             'todo'   => {},
723             'totals' => {
724                 'bad'         => 1,
725                 'bonus'       => 0,
726                 'files'       => 1,
727                 'good'        => 0,
728                 'max'         => 3,
729                 'ok'          => 7,
730                 'skipped'     => 0,
731                 'sub_skipped' => 0,
732                 'tests'       => 1,
733                 'todo'        => 0
734             }
735         },
736         'vms_nit' => {
737             'failed' => {
738                 "$TEST_DIR/vms_nit" => {
739                     'canon'  => 1,
740                     'estat'  => '',
741                     'failed' => 1,
742                     'max'    => 2,
743                     'name'   => "$TEST_DIR/vms_nit",
744                     'wstat'  => ''
745                 }
746             },
747             'todo'   => {},
748             'totals' => {
749                 'bad'         => 1,
750                 'bonus'       => 0,
751                 'files'       => 1,
752                 'good'        => 0,
753                 'max'         => 2,
754                 'ok'          => 1,
755                 'skipped'     => 0,
756                 'sub_skipped' => 0,
757                 'tests'       => 1,
758                 'todo'        => 0
759             }
760         }
761     };
762
763     my $num_tests = ( keys %$results ) * $PER_LOOP;
764
765     plan tests => $num_tests;
766
767     sub local_name {
768         my $name = shift;
769         return File::Spec->catfile( split /\//, $name );
770     }
771
772     sub local_result {
773         my $hash = shift;
774         my $new  = {};
775
776         while ( my ( $file, $want ) = each %$hash ) {
777             if ( exists $want->{name} ) {
778                 $want->{name} = local_name( $want->{name} );
779             }
780             $new->{ local_name($file) } = $want;
781         }
782         return $new;
783     }
784
785     sub vague_status {
786         my $hash = shift;
787         return $hash unless $^O eq 'VMS';
788
789         while ( my ( $file, $want ) = each %$hash ) {
790             for (qw( estat wstat )) {
791                 if ( exists $want->{$_} ) {
792                     $want->{$_} = $want->{$_} ? 1 : 0;
793                 }
794             }
795         }
796         return $hash;
797     }
798
799     {
800         local $^W = 0;
801
802         # Silence harness output
803         *TAP::Formatter::Console::_output = sub {
804
805             # do nothing
806         };
807     }
808
809     for my $test_key ( sort keys %$results ) {
810         my $result = $results->{$test_key};
811         SKIP: {
812             if ( $result->{require} && $] < $result->{require} ) {
813                 skip "Test requires Perl $result->{require}, we have $]", 4;
814             }
815
816             if ( my $skip_if = $result->{skip_if} ) {
817                 skip
818                   "Test '$test_key' can't run properly in this environment", 4
819                   if $skip_if->();
820             }
821
822             my @test_names = split( /,/, $test_key );
823             my @test_files
824               = map { File::Spec->catfile( $TEST_DIR, $_ ) } @test_names;
825
826             # For now we supress STDERR because it crufts up /our/ test
827             # results. Should probably capture and analyse it.
828             local ( *OLDERR, *OLDOUT );
829             open OLDERR, '>&STDERR' or die $!;
830             open OLDOUT, '>&STDOUT' or die $!;
831             my $devnull = File::Spec->devnull;
832             open STDERR, ">$devnull" or die $!;
833             open STDOUT, ">$devnull" or die $!;
834
835             my ( $tot, $fail, $todo, $harness, $aggregate )
836               = execute_tests( tests => \@test_files );
837
838             open STDERR, '>&OLDERR' or die $!;
839             open STDOUT, '>&OLDOUT' or die $!;
840
841             my $bench = delete $tot->{bench};
842             isa_ok $bench, 'Benchmark';
843
844             # Localise filenames in failed, todo
845             my $lfailed = vague_status( local_result( $result->{failed} ) );
846             my $ltodo   = vague_status( local_result( $result->{todo} ) );
847
848             # use Data::Dumper;
849             # diag Dumper( [ $lfailed, $ltodo ] );
850
851             is_deeply $tot, $result->{totals}, "totals match for $test_key";
852             is_deeply vague_status($fail), $lfailed,
853               "failure summary matches for $test_key";
854             is_deeply vague_status($todo), $ltodo,
855               "todo summary matches for $test_key";
856         }
857     }
858 }