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