Commit | Line | Data |
b965d173 |
1 | #!/usr/bin/perl -w |
2 | |
3 | BEGIN { |
5e727a3e |
4 | if ( $ENV{PERL_CORE} ) { |
5 | chdir 't'; |
6 | @INC = '../lib'; |
7 | } |
8 | else { |
9 | push @INC, 't/lib'; |
10 | } |
b965d173 |
11 | } |
12 | |
13 | use strict; |
b965d173 |
14 | |
15 | use Test::More 'no_plan'; |
16 | |
17 | use File::Spec; |
18 | use Config; |
19 | |
20 | use constant TRUE => "__TRUE__"; |
21 | use constant FALSE => "__FALSE__"; |
22 | |
23 | # if wait() is non-zero, we cannot reliably predict its value |
24 | use constant NOT_ZERO => "__NOT_ZERO__"; |
25 | |
26 | use TAP::Parser; |
27 | |
28 | my $IsVMS = $^O eq 'VMS'; |
29 | my $IsWin32 = $^O eq 'MSWin32'; |
30 | |
5e727a3e |
31 | my $SAMPLE_TESTS = File::Spec->catdir( |
32 | File::Spec->curdir, |
27fc0087 |
33 | ( $ENV{PERL_CORE} |
34 | ? ( File::Spec->updir(), 'ext', 'Test', 'Harness' ) |
35 | : () |
36 | ), |
37 | 't', |
38 | 'sample-tests' |
5e727a3e |
39 | ); |
b965d173 |
40 | |
41 | my %deprecated = map { $_ => 1 } qw( |
42 | TAP::Parser::good_plan |
43 | TAP::Parser::Result::Plan::passed |
44 | TAP::Parser::Result::Test::passed |
45 | TAP::Parser::Result::Test::actual_passed |
46 | TAP::Parser::Result::passed |
47 | ); |
48 | $SIG{__WARN__} = sub { |
49 | if ( $_[0] =~ /is deprecated/ ) { |
50 | my @caller = caller(1); |
51 | my $sub = $caller[3]; |
52 | ok exists $deprecated{$sub}, |
53 | "... we should get a deprecated warning for $sub"; |
54 | } |
55 | else { |
56 | CORE::warn @_; |
57 | } |
58 | }; |
59 | |
60 | # the %samples keys are the names of test scripts in t/sample-tests |
61 | my %samples = ( |
62 | descriptive => { |
63 | results => [ |
64 | { is_plan => TRUE, |
65 | raw => '1..5', |
66 | tests_planned => 5, |
67 | passed => TRUE, |
68 | is_ok => TRUE, |
69 | }, |
70 | { actual_passed => TRUE, |
71 | is_actual_ok => TRUE, |
72 | description => "Interlock activated", |
73 | passed => TRUE, |
74 | is_ok => TRUE, |
75 | is_test => TRUE, |
76 | has_skip => FALSE, |
77 | has_todo => FALSE, |
78 | number => 1, |
79 | is_unplanned => FALSE, |
80 | }, |
81 | { actual_passed => TRUE, |
82 | is_actual_ok => TRUE, |
83 | passed => TRUE, |
84 | is_ok => TRUE, |
85 | is_test => TRUE, |
86 | has_skip => FALSE, |
87 | has_todo => FALSE, |
88 | number => 2, |
89 | description => "Megathrusters are go", |
90 | is_unplanned => FALSE, |
91 | }, |
92 | { actual_passed => TRUE, |
93 | is_actual_ok => TRUE, |
94 | passed => TRUE, |
95 | is_ok => TRUE, |
96 | is_test => TRUE, |
97 | has_skip => FALSE, |
98 | has_todo => FALSE, |
99 | number => 3, |
100 | description => "Head formed", |
101 | is_unplanned => FALSE, |
102 | }, |
103 | { actual_passed => TRUE, |
104 | is_actual_ok => TRUE, |
105 | passed => TRUE, |
106 | is_ok => TRUE, |
107 | is_test => TRUE, |
108 | has_skip => FALSE, |
109 | has_todo => FALSE, |
110 | number => 4, |
111 | description => "Blazing sword formed", |
112 | is_unplanned => FALSE, |
113 | }, |
114 | { actual_passed => TRUE, |
115 | is_actual_ok => TRUE, |
116 | passed => TRUE, |
117 | is_ok => TRUE, |
118 | is_test => TRUE, |
119 | has_skip => FALSE, |
120 | has_todo => FALSE, |
121 | number => 5, |
122 | description => "Robeast destroyed", |
123 | is_unplanned => FALSE, |
124 | } |
125 | ], |
126 | plan => '1..5', |
127 | passed => [ 1 .. 5 ], |
128 | actual_passed => [ 1 .. 5 ], |
129 | failed => [], |
130 | actual_failed => [], |
131 | todo => [], |
132 | todo_passed => [], |
133 | skipped => [], |
134 | good_plan => TRUE, |
135 | is_good_plan => TRUE, |
136 | tests_planned => 5, |
137 | tests_run => 5, |
138 | parse_errors => [], |
139 | 'exit' => 0, |
140 | wait => 0, |
141 | version => 12, |
142 | }, |
143 | descriptive_trailing => { |
144 | results => [ |
145 | { actual_passed => TRUE, |
146 | is_actual_ok => TRUE, |
147 | description => "Interlock activated", |
148 | passed => TRUE, |
149 | is_ok => TRUE, |
150 | is_test => TRUE, |
151 | has_skip => FALSE, |
152 | has_todo => FALSE, |
153 | number => 1, |
154 | is_unplanned => FALSE, |
155 | }, |
156 | { actual_passed => TRUE, |
157 | is_actual_ok => TRUE, |
158 | passed => TRUE, |
159 | is_ok => TRUE, |
160 | is_test => TRUE, |
161 | has_skip => FALSE, |
162 | has_todo => FALSE, |
163 | number => 2, |
164 | description => "Megathrusters are go", |
165 | is_unplanned => FALSE, |
166 | }, |
167 | { actual_passed => TRUE, |
168 | is_actual_ok => TRUE, |
169 | passed => TRUE, |
170 | is_ok => TRUE, |
171 | is_test => TRUE, |
172 | has_skip => FALSE, |
173 | has_todo => FALSE, |
174 | number => 3, |
175 | description => "Head formed", |
176 | is_unplanned => FALSE, |
177 | }, |
178 | { actual_passed => TRUE, |
179 | is_actual_ok => TRUE, |
180 | passed => TRUE, |
181 | is_ok => TRUE, |
182 | is_test => TRUE, |
183 | has_skip => FALSE, |
184 | has_todo => FALSE, |
185 | number => 4, |
186 | description => "Blazing sword formed", |
187 | is_unplanned => FALSE, |
188 | }, |
189 | { actual_passed => TRUE, |
190 | is_actual_ok => TRUE, |
191 | passed => TRUE, |
192 | is_ok => TRUE, |
193 | is_test => TRUE, |
194 | has_skip => FALSE, |
195 | has_todo => FALSE, |
196 | number => 5, |
197 | description => "Robeast destroyed", |
198 | is_unplanned => FALSE, |
199 | }, |
200 | { is_plan => TRUE, |
201 | raw => '1..5', |
202 | tests_planned => 5, |
203 | passed => TRUE, |
204 | is_ok => TRUE, |
205 | }, |
206 | ], |
207 | plan => '1..5', |
208 | passed => [ 1 .. 5 ], |
209 | actual_passed => [ 1 .. 5 ], |
210 | failed => [], |
211 | actual_failed => [], |
212 | todo => [], |
213 | todo_passed => [], |
214 | skipped => [], |
215 | good_plan => TRUE, |
216 | is_good_plan => TRUE, |
217 | tests_planned => 5, |
218 | tests_run => 5, |
219 | parse_errors => [], |
220 | 'exit' => 0, |
221 | wait => 0, |
222 | version => 12, |
223 | }, |
224 | empty => { |
225 | results => [], |
226 | plan => '', |
227 | passed => [], |
228 | actual_passed => [], |
229 | failed => [], |
230 | actual_failed => [], |
231 | todo => [], |
232 | todo_passed => [], |
233 | skipped => [], |
234 | good_plan => FALSE, |
235 | is_good_plan => FALSE, |
236 | tests_planned => undef, |
237 | tests_run => 0, |
238 | parse_errors => ['No plan found in TAP output'], |
239 | 'exit' => 0, |
240 | wait => 0, |
241 | version => 12, |
242 | }, |
243 | simple => { |
244 | results => [ |
245 | { is_plan => TRUE, |
246 | raw => '1..5', |
247 | tests_planned => 5, |
248 | passed => TRUE, |
249 | is_ok => TRUE, |
250 | }, |
251 | { actual_passed => TRUE, |
252 | is_actual_ok => TRUE, |
253 | passed => TRUE, |
254 | is_ok => TRUE, |
255 | is_test => TRUE, |
256 | has_skip => FALSE, |
257 | has_todo => FALSE, |
258 | number => 1, |
259 | description => "", |
260 | }, |
261 | { actual_passed => TRUE, |
262 | is_actual_ok => TRUE, |
263 | passed => TRUE, |
264 | is_ok => TRUE, |
265 | is_test => TRUE, |
266 | has_skip => FALSE, |
267 | has_todo => FALSE, |
268 | number => 2, |
269 | description => "", |
270 | }, |
271 | { actual_passed => TRUE, |
272 | is_actual_ok => TRUE, |
273 | passed => TRUE, |
274 | is_ok => TRUE, |
275 | is_test => TRUE, |
276 | has_skip => FALSE, |
277 | has_todo => FALSE, |
278 | number => 3, |
279 | description => "", |
280 | }, |
281 | { actual_passed => TRUE, |
282 | is_actual_ok => TRUE, |
283 | passed => TRUE, |
284 | is_ok => TRUE, |
285 | is_test => TRUE, |
286 | has_skip => FALSE, |
287 | has_todo => FALSE, |
288 | number => 4, |
289 | description => "", |
290 | }, |
291 | { actual_passed => TRUE, |
292 | is_actual_ok => TRUE, |
293 | passed => TRUE, |
294 | is_ok => TRUE, |
295 | is_test => TRUE, |
296 | has_skip => FALSE, |
297 | has_todo => FALSE, |
298 | number => 5, |
299 | description => "", |
300 | }, |
301 | ], |
302 | plan => '1..5', |
303 | passed => [ 1 .. 5 ], |
304 | actual_passed => [ 1 .. 5 ], |
305 | failed => [], |
306 | actual_failed => [], |
307 | todo => [], |
308 | todo_passed => [], |
309 | skipped => [], |
310 | good_plan => TRUE, |
311 | is_good_plan => TRUE, |
312 | tests_planned => 5, |
313 | tests_run => 5, |
314 | parse_errors => [], |
315 | 'exit' => 0, |
316 | wait => 0, |
317 | version => 12, |
318 | }, |
319 | space_after_plan => { |
320 | results => [ |
321 | { is_plan => TRUE, |
322 | raw => '1..5 ', |
323 | tests_planned => 5, |
324 | passed => TRUE, |
325 | is_ok => TRUE, |
326 | }, |
327 | { actual_passed => TRUE, |
328 | is_actual_ok => TRUE, |
329 | passed => TRUE, |
330 | is_ok => TRUE, |
331 | is_test => TRUE, |
332 | has_skip => FALSE, |
333 | has_todo => FALSE, |
334 | number => 1, |
335 | description => "", |
336 | }, |
337 | { actual_passed => TRUE, |
338 | is_actual_ok => TRUE, |
339 | passed => TRUE, |
340 | is_ok => TRUE, |
341 | is_test => TRUE, |
342 | has_skip => FALSE, |
343 | has_todo => FALSE, |
344 | number => 2, |
345 | description => "", |
346 | }, |
347 | { actual_passed => TRUE, |
348 | is_actual_ok => TRUE, |
349 | passed => TRUE, |
350 | is_ok => TRUE, |
351 | is_test => TRUE, |
352 | has_skip => FALSE, |
353 | has_todo => FALSE, |
354 | number => 3, |
355 | description => "", |
356 | }, |
357 | { actual_passed => TRUE, |
358 | is_actual_ok => TRUE, |
359 | passed => TRUE, |
360 | is_ok => TRUE, |
361 | is_test => TRUE, |
362 | has_skip => FALSE, |
363 | has_todo => FALSE, |
364 | number => 4, |
365 | description => "", |
366 | }, |
367 | { actual_passed => TRUE, |
368 | is_actual_ok => TRUE, |
369 | passed => TRUE, |
370 | is_ok => TRUE, |
371 | is_test => TRUE, |
372 | has_skip => FALSE, |
373 | has_todo => FALSE, |
374 | number => 5, |
375 | description => "", |
376 | }, |
377 | ], |
378 | plan => '1..5', |
379 | passed => [ 1 .. 5 ], |
380 | actual_passed => [ 1 .. 5 ], |
381 | failed => [], |
382 | actual_failed => [], |
383 | todo => [], |
384 | todo_passed => [], |
385 | skipped => [], |
386 | good_plan => TRUE, |
387 | is_good_plan => TRUE, |
388 | tests_planned => 5, |
389 | tests_run => 5, |
390 | parse_errors => [], |
391 | 'exit' => 0, |
392 | wait => 0, |
393 | version => 12, |
394 | }, |
395 | simple_yaml => { |
396 | results => [ |
397 | { is_version => TRUE, |
398 | raw => 'TAP version 13', |
399 | }, |
400 | { is_plan => TRUE, |
401 | raw => '1..5', |
402 | tests_planned => 5, |
403 | passed => TRUE, |
404 | is_ok => TRUE, |
405 | }, |
406 | { actual_passed => TRUE, |
407 | is_actual_ok => TRUE, |
408 | passed => TRUE, |
409 | is_ok => TRUE, |
410 | is_test => TRUE, |
411 | has_skip => FALSE, |
412 | has_todo => FALSE, |
413 | number => 1, |
414 | description => "", |
415 | }, |
416 | { actual_passed => TRUE, |
417 | is_actual_ok => TRUE, |
418 | passed => TRUE, |
419 | is_ok => TRUE, |
420 | is_test => TRUE, |
421 | has_skip => FALSE, |
422 | has_todo => FALSE, |
423 | number => 2, |
424 | description => "", |
425 | }, |
426 | { is_yaml => TRUE, |
427 | data => [ |
428 | { 'fnurk' => 'skib', 'ponk' => 'gleeb' }, |
429 | { 'bar' => 'krup', 'foo' => 'plink' } |
430 | ], |
431 | raw => |
432 | " ---\n -\n fnurk: skib\n ponk: gleeb\n -\n bar: krup\n foo: plink\n ...", |
433 | }, |
434 | { actual_passed => TRUE, |
435 | is_actual_ok => TRUE, |
436 | passed => TRUE, |
437 | is_ok => TRUE, |
438 | is_test => TRUE, |
439 | has_skip => FALSE, |
440 | has_todo => FALSE, |
441 | number => 3, |
442 | description => "", |
443 | }, |
444 | { actual_passed => TRUE, |
445 | is_actual_ok => TRUE, |
446 | passed => TRUE, |
447 | is_ok => TRUE, |
448 | is_test => TRUE, |
449 | has_skip => FALSE, |
450 | has_todo => FALSE, |
451 | number => 4, |
452 | description => "", |
453 | }, |
454 | { is_yaml => TRUE, |
455 | data => { |
456 | 'got' => [ '1', 'pong', '4' ], |
457 | 'expected' => [ '1', '2', '4' ] |
458 | }, |
459 | raw => |
460 | " ---\n expected:\n - 1\n - 2\n - 4\n got:\n - 1\n - pong\n - 4\n ...", |
461 | }, |
462 | { actual_passed => TRUE, |
463 | is_actual_ok => TRUE, |
464 | passed => TRUE, |
465 | is_ok => TRUE, |
466 | is_test => TRUE, |
467 | has_skip => FALSE, |
468 | has_todo => FALSE, |
469 | number => 5, |
470 | description => "", |
471 | }, |
472 | ], |
473 | plan => '1..5', |
474 | passed => [ 1 .. 5 ], |
475 | actual_passed => [ 1 .. 5 ], |
476 | failed => [], |
477 | actual_failed => [], |
478 | todo => [], |
479 | todo_passed => [], |
480 | skipped => [], |
481 | good_plan => TRUE, |
482 | is_good_plan => TRUE, |
483 | tests_planned => 5, |
484 | tests_run => 5, |
485 | parse_errors => [], |
486 | 'exit' => 0, |
487 | wait => 0, |
488 | version => 13, |
489 | }, |
490 | simple_fail => { |
491 | results => [ |
492 | { is_plan => TRUE, |
493 | raw => '1..5', |
494 | tests_planned => 5, |
495 | passed => TRUE, |
496 | is_ok => TRUE, |
497 | }, |
498 | { actual_passed => TRUE, |
499 | is_actual_ok => TRUE, |
500 | passed => TRUE, |
501 | is_ok => TRUE, |
502 | is_test => TRUE, |
503 | has_skip => FALSE, |
504 | has_todo => FALSE, |
505 | number => 1, |
506 | description => "", |
507 | }, |
508 | { actual_passed => FALSE, |
509 | is_actual_ok => FALSE, |
510 | passed => FALSE, |
511 | is_ok => FALSE, |
512 | is_test => TRUE, |
513 | has_skip => FALSE, |
514 | has_todo => FALSE, |
515 | number => 2, |
516 | description => "", |
517 | }, |
518 | { actual_passed => TRUE, |
519 | is_actual_ok => TRUE, |
520 | passed => TRUE, |
521 | is_ok => TRUE, |
522 | is_test => TRUE, |
523 | has_skip => FALSE, |
524 | has_todo => FALSE, |
525 | number => 3, |
526 | description => "", |
527 | }, |
528 | { actual_passed => TRUE, |
529 | is_actual_ok => TRUE, |
530 | passed => TRUE, |
531 | is_ok => TRUE, |
532 | is_test => TRUE, |
533 | has_skip => FALSE, |
534 | has_todo => FALSE, |
535 | number => 4, |
536 | description => "", |
537 | }, |
538 | { actual_passed => FALSE, |
539 | is_actual_ok => FALSE, |
540 | passed => FALSE, |
541 | is_ok => FALSE, |
542 | is_test => TRUE, |
543 | has_skip => FALSE, |
544 | has_todo => FALSE, |
545 | number => 5, |
546 | description => "", |
547 | }, |
548 | ], |
549 | plan => '1..5', |
550 | passed => [ 1, 3, 4 ], |
551 | actual_passed => [ 1, 3, 4 ], |
552 | failed => [ 2, 5 ], |
553 | actual_failed => [ 2, 5 ], |
554 | todo => [], |
555 | todo_passed => [], |
556 | skipped => [], |
557 | good_plan => TRUE, |
558 | is_good_plan => TRUE, |
559 | tests_planned => 5, |
560 | tests_run => 5, |
561 | parse_errors => [], |
562 | 'exit' => 0, |
563 | wait => 0, |
564 | version => 12, |
565 | }, |
566 | skip => { |
567 | results => [ |
568 | { is_plan => TRUE, |
569 | raw => '1..5', |
570 | tests_planned => 5, |
571 | passed => TRUE, |
572 | is_ok => TRUE, |
573 | }, |
574 | { actual_passed => TRUE, |
575 | is_actual_ok => TRUE, |
576 | passed => TRUE, |
577 | is_ok => TRUE, |
578 | is_test => TRUE, |
579 | has_skip => FALSE, |
580 | has_todo => FALSE, |
581 | number => 1, |
582 | description => "", |
583 | }, |
584 | { actual_passed => TRUE, |
585 | is_actual_ok => TRUE, |
586 | passed => TRUE, |
587 | is_ok => TRUE, |
588 | is_test => TRUE, |
589 | has_skip => TRUE, |
590 | has_todo => FALSE, |
591 | number => 2, |
592 | description => "", |
593 | explanation => 'rain delay', |
594 | }, |
595 | { actual_passed => TRUE, |
596 | is_actual_ok => TRUE, |
597 | passed => TRUE, |
598 | is_ok => TRUE, |
599 | is_test => TRUE, |
600 | has_skip => FALSE, |
601 | has_todo => FALSE, |
602 | number => 3, |
603 | description => "", |
604 | }, |
605 | { actual_passed => TRUE, |
606 | is_actual_ok => TRUE, |
607 | passed => TRUE, |
608 | is_ok => TRUE, |
609 | is_test => TRUE, |
610 | has_skip => FALSE, |
611 | has_todo => FALSE, |
612 | number => 4, |
613 | description => "", |
614 | }, |
615 | { actual_passed => TRUE, |
616 | is_actual_ok => TRUE, |
617 | passed => TRUE, |
618 | is_ok => TRUE, |
619 | is_test => TRUE, |
620 | has_skip => FALSE, |
621 | has_todo => FALSE, |
622 | number => 5, |
623 | description => "", |
624 | }, |
625 | ], |
626 | plan => '1..5', |
627 | passed => [ 1 .. 5 ], |
628 | actual_passed => [ 1 .. 5 ], |
629 | failed => [], |
630 | actual_failed => [], |
631 | todo => [], |
632 | todo_passed => [], |
633 | skipped => [2], |
634 | good_plan => TRUE, |
635 | is_good_plan => TRUE, |
636 | tests_planned => 5, |
637 | tests_run => 5, |
638 | parse_errors => [], |
639 | 'exit' => 0, |
640 | wait => 0, |
641 | version => 12, |
642 | }, |
643 | skip_nomsg => { |
644 | results => [ |
645 | { is_plan => TRUE, |
646 | passed => TRUE, |
647 | is_ok => TRUE, |
648 | raw => '1..1', |
649 | tests_planned => 1, |
650 | }, |
651 | { actual_passed => TRUE, |
652 | is_actual_ok => TRUE, |
653 | passed => TRUE, |
654 | is_ok => TRUE, |
655 | is_test => TRUE, |
656 | has_skip => TRUE, |
657 | has_todo => FALSE, |
658 | number => 1, |
659 | description => "", |
660 | explanation => '', |
661 | }, |
662 | ], |
663 | plan => '1..1', |
664 | passed => [1], |
665 | actual_passed => [1], |
666 | failed => [], |
667 | actual_failed => [], |
668 | todo => [], |
669 | todo_passed => [], |
670 | skipped => [1], |
671 | good_plan => TRUE, |
672 | is_good_plan => TRUE, |
673 | tests_planned => 1, |
674 | tests_run => TRUE, |
675 | parse_errors => [], |
676 | 'exit' => 0, |
677 | wait => 0, |
678 | version => 12, |
679 | }, |
680 | todo_inline => { |
681 | results => [ |
682 | { is_plan => TRUE, |
683 | passed => TRUE, |
684 | is_ok => TRUE, |
685 | raw => '1..3', |
686 | tests_planned => 3, |
687 | }, |
688 | { actual_passed => FALSE, |
689 | is_actual_ok => FALSE, |
690 | passed => TRUE, |
691 | is_ok => TRUE, |
692 | is_test => TRUE, |
693 | has_skip => FALSE, |
694 | has_todo => TRUE, |
695 | number => 1, |
696 | description => "- Foo", |
697 | explanation => 'Just testing the todo interface.', |
698 | }, |
699 | { actual_passed => TRUE, |
700 | is_actual_ok => TRUE, |
701 | passed => TRUE, |
702 | is_ok => TRUE, |
703 | is_test => TRUE, |
704 | has_skip => FALSE, |
705 | has_todo => TRUE, |
706 | number => 2, |
707 | description => "- Unexpected success", |
708 | explanation => 'Just testing the todo interface.', |
709 | }, |
710 | { actual_passed => TRUE, |
711 | is_actual_ok => TRUE, |
712 | passed => TRUE, |
713 | is_ok => TRUE, |
714 | is_test => TRUE, |
715 | has_skip => FALSE, |
716 | has_todo => FALSE, |
717 | number => 3, |
718 | description => "- This is not todo", |
719 | explanation => '', |
720 | }, |
721 | ], |
722 | plan => '1..3', |
723 | passed => [ 1, 2, 3 ], |
724 | actual_passed => [ 2, 3 ], |
725 | failed => [], |
726 | actual_failed => [1], |
727 | todo => [ 1, 2 ], |
728 | todo_passed => [2], |
729 | skipped => [], |
730 | good_plan => TRUE, |
731 | is_good_plan => TRUE, |
732 | tests_planned => 3, |
733 | tests_run => 3, |
734 | parse_errors => [], |
735 | 'exit' => 0, |
736 | wait => 0, |
737 | version => 12, |
738 | }, |
739 | todo => { |
740 | results => [ |
741 | { is_plan => TRUE, |
742 | passed => TRUE, |
743 | is_ok => TRUE, |
744 | raw => '1..5 todo 3 2;', |
745 | tests_planned => 5, |
746 | todo_list => [ 3, 2 ], |
747 | }, |
748 | { actual_passed => TRUE, |
749 | is_actual_ok => TRUE, |
750 | passed => TRUE, |
751 | is_ok => TRUE, |
752 | is_test => TRUE, |
753 | has_skip => FALSE, |
754 | has_todo => FALSE, |
755 | number => 1, |
756 | description => "", |
757 | explanation => '', |
758 | }, |
759 | { actual_passed => TRUE, |
760 | is_actual_ok => TRUE, |
761 | passed => TRUE, |
762 | is_ok => TRUE, |
763 | is_test => TRUE, |
764 | has_skip => FALSE, |
765 | has_todo => TRUE, |
766 | number => 2, |
767 | description => "", |
768 | explanation => '', |
769 | }, |
770 | { actual_passed => FALSE, |
771 | is_actual_ok => FALSE, |
772 | passed => TRUE, |
773 | is_ok => TRUE, |
774 | is_test => TRUE, |
775 | has_skip => FALSE, |
776 | has_todo => TRUE, |
777 | number => 3, |
778 | description => "", |
779 | explanation => '', |
780 | }, |
781 | { actual_passed => TRUE, |
782 | is_actual_ok => TRUE, |
783 | passed => TRUE, |
784 | is_ok => TRUE, |
785 | is_test => TRUE, |
786 | has_skip => FALSE, |
787 | has_todo => FALSE, |
788 | number => 4, |
789 | description => "", |
790 | explanation => '', |
791 | }, |
792 | { actual_passed => TRUE, |
793 | is_actual_ok => TRUE, |
794 | passed => TRUE, |
795 | is_ok => TRUE, |
796 | is_test => TRUE, |
797 | has_skip => FALSE, |
798 | has_todo => FALSE, |
799 | number => 5, |
800 | description => "", |
801 | explanation => '', |
802 | }, |
803 | ], |
804 | plan => '1..5', |
805 | passed => [ 1, 2, 3, 4, 5 ], |
806 | actual_passed => [ 1, 2, 4, 5 ], |
807 | failed => [], |
808 | actual_failed => [3], |
809 | todo => [ 2, 3 ], |
810 | todo_passed => [2], |
811 | skipped => [], |
812 | good_plan => TRUE, |
813 | is_good_plan => TRUE, |
814 | tests_planned => 5, |
815 | tests_run => 5, |
816 | parse_errors => [], |
817 | 'exit' => 0, |
818 | wait => 0, |
819 | version => 12, |
820 | }, |
821 | duplicates => { |
822 | results => [ |
823 | { is_plan => TRUE, |
824 | passed => TRUE, |
825 | is_ok => TRUE, |
826 | raw => '1..10', |
827 | tests_planned => 10, |
828 | }, |
829 | { actual_passed => TRUE, |
830 | is_actual_ok => TRUE, |
831 | passed => TRUE, |
832 | is_ok => TRUE, |
833 | is_test => TRUE, |
834 | has_skip => FALSE, |
835 | has_todo => FALSE, |
836 | number => 1, |
837 | description => '', |
838 | explanation => '', |
839 | is_unplanned => FALSE, |
840 | }, |
841 | { actual_passed => TRUE, |
842 | is_actual_ok => TRUE, |
843 | passed => TRUE, |
844 | is_ok => TRUE, |
845 | is_test => TRUE, |
846 | has_skip => FALSE, |
847 | has_todo => FALSE, |
848 | number => 2, |
849 | description => '', |
850 | explanation => '', |
851 | is_unplanned => FALSE, |
852 | }, |
853 | { actual_passed => TRUE, |
854 | is_actual_ok => TRUE, |
855 | passed => TRUE, |
856 | is_ok => TRUE, |
857 | is_test => TRUE, |
858 | has_skip => FALSE, |
859 | has_todo => FALSE, |
860 | number => 3, |
861 | description => '', |
862 | explanation => '', |
863 | is_unplanned => FALSE, |
864 | }, |
865 | { actual_passed => TRUE, |
866 | is_actual_ok => TRUE, |
867 | passed => TRUE, |
868 | is_ok => TRUE, |
869 | is_test => TRUE, |
870 | has_skip => FALSE, |
871 | has_todo => FALSE, |
872 | number => 4, |
873 | description => '', |
874 | explanation => '', |
875 | is_unplanned => FALSE, |
876 | }, |
877 | { actual_passed => TRUE, |
878 | is_actual_ok => TRUE, |
879 | passed => TRUE, |
880 | is_ok => TRUE, |
881 | is_test => TRUE, |
882 | has_skip => FALSE, |
883 | has_todo => FALSE, |
884 | number => 4, |
885 | description => '', |
886 | explanation => '', |
887 | is_unplanned => FALSE, |
888 | }, |
889 | { actual_passed => TRUE, |
890 | is_actual_ok => TRUE, |
891 | passed => TRUE, |
892 | is_ok => TRUE, |
893 | is_test => TRUE, |
894 | has_skip => FALSE, |
895 | has_todo => FALSE, |
896 | number => 5, |
897 | description => '', |
898 | explanation => '', |
899 | is_unplanned => FALSE, |
900 | }, |
901 | { actual_passed => TRUE, |
902 | is_actual_ok => TRUE, |
903 | passed => TRUE, |
904 | is_ok => TRUE, |
905 | is_test => TRUE, |
906 | has_skip => FALSE, |
907 | has_todo => FALSE, |
908 | number => 6, |
909 | description => '', |
910 | explanation => '', |
911 | is_unplanned => FALSE, |
912 | }, |
913 | { actual_passed => TRUE, |
914 | is_actual_ok => TRUE, |
915 | passed => TRUE, |
916 | is_ok => TRUE, |
917 | is_test => TRUE, |
918 | has_skip => FALSE, |
919 | has_todo => FALSE, |
920 | number => 7, |
921 | description => '', |
922 | explanation => '', |
923 | is_unplanned => FALSE, |
924 | }, |
925 | { actual_passed => TRUE, |
926 | is_actual_ok => TRUE, |
927 | passed => TRUE, |
928 | is_ok => TRUE, |
929 | is_test => TRUE, |
930 | has_skip => FALSE, |
931 | has_todo => FALSE, |
932 | number => 8, |
933 | description => '', |
934 | explanation => '', |
935 | is_unplanned => FALSE, |
936 | }, |
937 | { actual_passed => TRUE, |
938 | is_actual_ok => TRUE, |
939 | passed => TRUE, |
940 | is_ok => TRUE, |
941 | is_test => TRUE, |
942 | has_skip => FALSE, |
943 | has_todo => FALSE, |
944 | number => 9, |
945 | description => '', |
946 | explanation => '', |
947 | is_unplanned => FALSE, |
948 | }, |
949 | { actual_passed => TRUE, |
950 | is_actual_ok => TRUE, |
951 | passed => FALSE, |
952 | is_ok => FALSE, |
953 | is_test => TRUE, |
954 | has_skip => FALSE, |
955 | has_todo => FALSE, |
956 | number => 10, |
957 | description => '', |
958 | explanation => '', |
959 | is_unplanned => TRUE, |
960 | }, |
961 | ], |
962 | plan => '1..10', |
963 | passed => [ 1 .. 4, 4 .. 9 ], |
964 | actual_passed => [ 1 .. 4, 4 .. 10 ], |
965 | failed => [10], |
966 | actual_failed => [], |
967 | todo => [], |
968 | todo_passed => [], |
969 | skipped => [], |
970 | good_plan => FALSE, |
971 | tests_planned => 10, |
972 | tests_run => 11, |
973 | parse_errors => [ |
974 | 'Tests out of sequence. Found (4) but expected (5)', |
975 | 'Tests out of sequence. Found (5) but expected (6)', |
976 | 'Tests out of sequence. Found (6) but expected (7)', |
977 | 'Tests out of sequence. Found (7) but expected (8)', |
978 | 'Tests out of sequence. Found (8) but expected (9)', |
979 | 'Tests out of sequence. Found (9) but expected (10)', |
980 | 'Tests out of sequence. Found (10) but expected (11)', |
981 | 'Bad plan. You planned 10 tests but ran 11.', |
982 | ], |
983 | 'exit' => 0, |
984 | wait => 0, |
985 | }, |
986 | no_nums => { |
987 | results => [ |
988 | { is_plan => TRUE, |
989 | passed => TRUE, |
990 | is_ok => TRUE, |
991 | raw => '1..5', |
992 | tests_planned => 5, |
993 | }, |
994 | { actual_passed => TRUE, |
995 | is_actual_ok => TRUE, |
996 | description => "", |
997 | passed => TRUE, |
998 | is_ok => TRUE, |
999 | is_test => TRUE, |
1000 | has_skip => FALSE, |
1001 | has_todo => FALSE, |
1002 | number => 1, |
1003 | }, |
1004 | { actual_passed => TRUE, |
1005 | is_actual_ok => TRUE, |
1006 | passed => TRUE, |
1007 | is_ok => TRUE, |
1008 | is_test => TRUE, |
1009 | has_skip => FALSE, |
1010 | has_todo => FALSE, |
1011 | number => 2, |
1012 | description => "", |
1013 | }, |
1014 | { actual_passed => FALSE, |
1015 | is_actual_ok => FALSE, |
1016 | passed => FALSE, |
1017 | is_ok => FALSE, |
1018 | is_test => TRUE, |
1019 | has_skip => FALSE, |
1020 | has_todo => FALSE, |
1021 | number => 3, |
1022 | description => "", |
1023 | }, |
1024 | { actual_passed => TRUE, |
1025 | is_actual_ok => TRUE, |
1026 | passed => TRUE, |
1027 | is_ok => TRUE, |
1028 | is_test => TRUE, |
1029 | has_skip => FALSE, |
1030 | has_todo => FALSE, |
1031 | number => 4, |
1032 | description => "", |
1033 | }, |
1034 | { actual_passed => TRUE, |
1035 | is_actual_ok => TRUE, |
1036 | passed => TRUE, |
1037 | is_ok => TRUE, |
1038 | is_test => TRUE, |
1039 | has_skip => FALSE, |
1040 | has_todo => FALSE, |
1041 | number => 5, |
1042 | description => "", |
1043 | } |
1044 | ], |
1045 | plan => '1..5', |
1046 | passed => [ 1, 2, 4, 5 ], |
1047 | actual_passed => [ 1, 2, 4, 5 ], |
1048 | failed => [3], |
1049 | actual_failed => [3], |
1050 | todo => [], |
1051 | todo_passed => [], |
1052 | skipped => [], |
1053 | good_plan => TRUE, |
1054 | is_good_plan => TRUE, |
1055 | tests_planned => 5, |
1056 | tests_run => 5, |
1057 | parse_errors => [], |
1058 | 'exit' => 0, |
1059 | wait => 0, |
1060 | version => 12, |
1061 | }, |
1062 | bailout => { |
1063 | results => [ |
1064 | { is_plan => TRUE, |
1065 | passed => TRUE, |
1066 | is_ok => TRUE, |
1067 | raw => '1..5', |
1068 | tests_planned => 5, |
1069 | }, |
1070 | { actual_passed => TRUE, |
1071 | is_actual_ok => TRUE, |
1072 | description => "", |
1073 | passed => TRUE, |
1074 | is_ok => TRUE, |
1075 | is_test => TRUE, |
1076 | has_skip => FALSE, |
1077 | has_todo => FALSE, |
1078 | number => 1, |
1079 | }, |
1080 | { actual_passed => TRUE, |
1081 | is_actual_ok => TRUE, |
1082 | passed => TRUE, |
1083 | is_ok => TRUE, |
1084 | is_test => TRUE, |
1085 | has_skip => FALSE, |
1086 | has_todo => FALSE, |
1087 | number => 2, |
1088 | description => "", |
1089 | }, |
1090 | { actual_passed => TRUE, |
1091 | is_actual_ok => TRUE, |
1092 | passed => TRUE, |
1093 | is_ok => TRUE, |
1094 | is_test => TRUE, |
1095 | has_skip => FALSE, |
1096 | has_todo => FALSE, |
1097 | number => 3, |
1098 | description => "", |
1099 | }, |
1100 | { is_bailout => TRUE, |
1101 | explanation => "GERONIMMMOOOOOO!!!", |
1102 | }, |
1103 | { actual_passed => TRUE, |
1104 | is_actual_ok => TRUE, |
1105 | passed => TRUE, |
1106 | is_ok => TRUE, |
1107 | is_test => TRUE, |
1108 | has_skip => FALSE, |
1109 | has_todo => FALSE, |
1110 | number => 4, |
1111 | description => "", |
1112 | }, |
1113 | { actual_passed => TRUE, |
1114 | is_actual_ok => TRUE, |
1115 | passed => TRUE, |
1116 | is_ok => TRUE, |
1117 | is_test => TRUE, |
1118 | has_skip => FALSE, |
1119 | has_todo => FALSE, |
1120 | number => 5, |
1121 | description => "", |
1122 | } |
1123 | ], |
1124 | plan => '1..5', |
1125 | passed => [ 1 .. 5 ], |
1126 | actual_passed => [ 1 .. 5 ], |
1127 | failed => [], |
1128 | actual_failed => [], |
1129 | todo => [], |
1130 | todo_passed => [], |
1131 | skipped => [], |
1132 | good_plan => TRUE, |
1133 | is_good_plan => TRUE, |
1134 | tests_planned => 5, |
1135 | tests_run => 5, |
1136 | parse_errors => [], |
1137 | 'exit' => 0, |
1138 | wait => 0, |
1139 | version => 12, |
1140 | }, |
1141 | no_output => { |
1142 | results => [], |
1143 | plan => '', |
1144 | passed => [], |
1145 | actual_passed => [], |
1146 | failed => [], |
1147 | actual_failed => [], |
1148 | todo => [], |
1149 | todo_passed => [], |
1150 | skipped => [], |
1151 | good_plan => FALSE, |
1152 | tests_planned => undef, |
1153 | tests_run => 0, |
1154 | parse_errors => [ 'No plan found in TAP output', ], |
1155 | 'exit' => 0, |
1156 | wait => 0, |
1157 | }, |
1158 | too_many => { |
1159 | results => [ |
1160 | { is_plan => TRUE, |
1161 | passed => TRUE, |
1162 | is_ok => TRUE, |
1163 | raw => '1..3', |
1164 | tests_planned => 3, |
1165 | }, |
1166 | { actual_passed => TRUE, |
1167 | is_actual_ok => TRUE, |
1168 | description => "", |
1169 | passed => TRUE, |
1170 | is_ok => TRUE, |
1171 | is_test => TRUE, |
1172 | has_skip => FALSE, |
1173 | has_todo => FALSE, |
1174 | number => 1, |
1175 | is_unplanned => FALSE, |
1176 | }, |
1177 | { actual_passed => TRUE, |
1178 | is_actual_ok => TRUE, |
1179 | passed => TRUE, |
1180 | is_ok => TRUE, |
1181 | is_test => TRUE, |
1182 | has_skip => FALSE, |
1183 | has_todo => FALSE, |
1184 | number => 2, |
1185 | description => "", |
1186 | is_unplanned => FALSE, |
1187 | }, |
1188 | { actual_passed => TRUE, |
1189 | is_actual_ok => TRUE, |
1190 | passed => TRUE, |
1191 | is_ok => TRUE, |
1192 | is_test => TRUE, |
1193 | has_skip => FALSE, |
1194 | has_todo => FALSE, |
1195 | number => 3, |
1196 | description => "", |
1197 | is_unplanned => FALSE, |
1198 | }, |
1199 | { actual_passed => TRUE, |
1200 | is_actual_ok => TRUE, |
1201 | passed => FALSE, |
1202 | is_ok => FALSE, |
1203 | is_test => TRUE, |
1204 | has_skip => FALSE, |
1205 | has_todo => FALSE, |
1206 | number => 4, |
1207 | description => "", |
1208 | is_unplanned => TRUE, |
1209 | }, |
1210 | { actual_passed => TRUE, |
1211 | is_actual_ok => TRUE, |
1212 | passed => FALSE, |
1213 | is_ok => FALSE, |
1214 | is_test => TRUE, |
1215 | has_skip => FALSE, |
1216 | has_todo => FALSE, |
1217 | number => 5, |
1218 | description => "", |
1219 | is_unplanned => TRUE, |
1220 | }, |
1221 | { actual_passed => TRUE, |
1222 | is_actual_ok => TRUE, |
1223 | passed => FALSE, |
1224 | is_ok => FALSE, |
1225 | is_test => TRUE, |
1226 | has_skip => FALSE, |
1227 | has_todo => FALSE, |
1228 | number => 6, |
1229 | description => "", |
1230 | is_unplanned => TRUE, |
1231 | }, |
1232 | { actual_passed => TRUE, |
1233 | is_actual_ok => TRUE, |
1234 | passed => FALSE, |
1235 | is_ok => FALSE, |
1236 | is_test => TRUE, |
1237 | has_skip => FALSE, |
1238 | has_todo => FALSE, |
1239 | number => 7, |
1240 | description => "", |
1241 | is_unplanned => TRUE, |
1242 | }, |
1243 | ], |
1244 | plan => '1..3', |
1245 | passed => [ 1 .. 3 ], |
1246 | actual_passed => [ 1 .. 7 ], |
1247 | failed => [ 4 .. 7 ], |
1248 | actual_failed => [], |
1249 | todo => [], |
1250 | todo_passed => [], |
1251 | skipped => [], |
1252 | good_plan => FALSE, |
1253 | tests_planned => 3, |
1254 | tests_run => 7, |
1255 | parse_errors => ['Bad plan. You planned 3 tests but ran 7.'], |
1256 | 'exit' => 4, |
1257 | wait => NOT_ZERO, |
1258 | skip_if => sub {$IsVMS}, |
1259 | }, |
1260 | taint => { |
1261 | results => [ |
1262 | { is_plan => TRUE, |
1263 | passed => TRUE, |
1264 | is_ok => TRUE, |
1265 | raw => '1..1', |
1266 | tests_planned => TRUE, |
1267 | }, |
1268 | { actual_passed => TRUE, |
1269 | is_actual_ok => TRUE, |
1270 | description => "- -T honored", |
1271 | passed => TRUE, |
1272 | is_ok => TRUE, |
1273 | is_test => TRUE, |
1274 | has_skip => FALSE, |
1275 | has_todo => FALSE, |
1276 | number => 1, |
1277 | }, |
1278 | ], |
1279 | plan => '1..1', |
1280 | passed => [ 1 .. 1 ], |
1281 | actual_passed => [ 1 .. 1 ], |
1282 | failed => [], |
1283 | actual_failed => [], |
1284 | todo => [], |
1285 | todo_passed => [], |
1286 | skipped => [], |
1287 | good_plan => TRUE, |
1288 | is_good_plan => TRUE, |
1289 | tests_planned => TRUE, |
1290 | tests_run => TRUE, |
1291 | parse_errors => [], |
1292 | 'exit' => 0, |
1293 | wait => 0, |
1294 | version => 12, |
1295 | }, |
1296 | 'die' => { |
1297 | results => [], |
1298 | plan => '', |
1299 | passed => [], |
1300 | actual_passed => [], |
1301 | failed => [], |
1302 | actual_failed => [], |
1303 | todo => [], |
1304 | todo_passed => [], |
1305 | skipped => [], |
1306 | good_plan => FALSE, |
1307 | tests_planned => undef, |
1308 | tests_run => 0, |
1309 | parse_errors => [ 'No plan found in TAP output', ], |
1310 | 'exit' => NOT_ZERO, |
1311 | wait => NOT_ZERO, |
1312 | }, |
1313 | die_head_end => { |
1314 | results => [ |
1315 | { actual_passed => TRUE, |
1316 | is_actual_ok => TRUE, |
1317 | passed => TRUE, |
1318 | is_ok => TRUE, |
1319 | is_test => TRUE, |
1320 | has_skip => FALSE, |
1321 | has_todo => FALSE, |
1322 | number => 1, |
1323 | description => '', |
1324 | explanation => '', |
1325 | }, |
1326 | { actual_passed => TRUE, |
1327 | is_actual_ok => TRUE, |
1328 | passed => TRUE, |
1329 | is_ok => TRUE, |
1330 | is_test => TRUE, |
1331 | has_skip => FALSE, |
1332 | has_todo => FALSE, |
1333 | number => 2, |
1334 | description => '', |
1335 | explanation => '', |
1336 | }, |
1337 | { actual_passed => TRUE, |
1338 | is_actual_ok => TRUE, |
1339 | passed => TRUE, |
1340 | is_ok => TRUE, |
1341 | is_test => TRUE, |
1342 | has_skip => FALSE, |
1343 | has_todo => FALSE, |
1344 | number => 3, |
1345 | description => '', |
1346 | explanation => '', |
1347 | }, |
1348 | { actual_passed => TRUE, |
1349 | is_actual_ok => TRUE, |
1350 | passed => TRUE, |
1351 | is_ok => TRUE, |
1352 | is_test => TRUE, |
1353 | has_skip => FALSE, |
1354 | has_todo => FALSE, |
1355 | number => 4, |
1356 | description => '', |
1357 | explanation => '', |
1358 | }, |
1359 | ], |
1360 | plan => '', |
1361 | passed => [ 1 .. 4 ], |
1362 | actual_passed => [ 1 .. 4 ], |
1363 | failed => [], |
1364 | actual_failed => [], |
1365 | todo => [], |
1366 | todo_passed => [], |
1367 | skipped => [], |
1368 | good_plan => FALSE, |
1369 | tests_planned => undef, |
1370 | tests_run => 4, |
1371 | parse_errors => [ 'No plan found in TAP output', ], |
1372 | 'exit' => NOT_ZERO, |
1373 | wait => NOT_ZERO, |
1374 | }, |
1375 | die_last_minute => { |
1376 | results => [ |
1377 | { actual_passed => TRUE, |
1378 | is_actual_ok => TRUE, |
1379 | passed => TRUE, |
1380 | is_ok => TRUE, |
1381 | is_test => TRUE, |
1382 | has_skip => FALSE, |
1383 | has_todo => FALSE, |
1384 | number => 1, |
1385 | description => '', |
1386 | explanation => '', |
1387 | }, |
1388 | { actual_passed => TRUE, |
1389 | is_actual_ok => TRUE, |
1390 | passed => TRUE, |
1391 | is_ok => TRUE, |
1392 | is_test => TRUE, |
1393 | has_skip => FALSE, |
1394 | has_todo => FALSE, |
1395 | number => 2, |
1396 | description => '', |
1397 | explanation => '', |
1398 | }, |
1399 | { actual_passed => TRUE, |
1400 | is_actual_ok => TRUE, |
1401 | passed => TRUE, |
1402 | is_ok => TRUE, |
1403 | is_test => TRUE, |
1404 | has_skip => FALSE, |
1405 | has_todo => FALSE, |
1406 | number => 3, |
1407 | description => '', |
1408 | explanation => '', |
1409 | }, |
1410 | { actual_passed => TRUE, |
1411 | is_actual_ok => TRUE, |
1412 | passed => TRUE, |
1413 | is_ok => TRUE, |
1414 | is_test => TRUE, |
1415 | has_skip => FALSE, |
1416 | has_todo => FALSE, |
1417 | number => 4, |
1418 | description => '', |
1419 | explanation => '', |
1420 | }, |
1421 | { is_plan => TRUE, |
1422 | passed => TRUE, |
1423 | is_ok => TRUE, |
1424 | raw => '1..4', |
1425 | tests_planned => 4, |
1426 | }, |
1427 | ], |
1428 | plan => '1..4', |
1429 | passed => [ 1 .. 4 ], |
1430 | actual_passed => [ 1 .. 4 ], |
1431 | failed => [], |
1432 | actual_failed => [], |
1433 | todo => [], |
1434 | todo_passed => [], |
1435 | skipped => [], |
1436 | good_plan => TRUE, |
1437 | is_good_plan => TRUE, |
1438 | tests_planned => 4, |
1439 | tests_run => 4, |
1440 | parse_errors => [], |
1441 | 'exit' => NOT_ZERO, |
1442 | wait => NOT_ZERO, |
1443 | }, |
1444 | bignum => { |
1445 | results => [ |
1446 | { is_plan => TRUE, |
1447 | passed => TRUE, |
1448 | is_ok => TRUE, |
1449 | raw => '1..2', |
1450 | tests_planned => 2, |
1451 | }, |
1452 | { actual_passed => TRUE, |
1453 | is_actual_ok => TRUE, |
1454 | passed => TRUE, |
1455 | is_ok => TRUE, |
1456 | is_test => TRUE, |
1457 | has_skip => FALSE, |
1458 | has_todo => FALSE, |
1459 | number => 1, |
1460 | description => '', |
1461 | explanation => '', |
1462 | }, |
1463 | { actual_passed => TRUE, |
1464 | is_actual_ok => TRUE, |
1465 | passed => TRUE, |
1466 | is_ok => TRUE, |
1467 | is_test => TRUE, |
1468 | has_skip => FALSE, |
1469 | has_todo => FALSE, |
1470 | number => 2, |
1471 | description => '', |
1472 | explanation => '', |
1473 | }, |
1474 | { actual_passed => TRUE, |
1475 | is_actual_ok => TRUE, |
1476 | passed => FALSE, |
1477 | is_ok => FALSE, |
1478 | is_test => TRUE, |
1479 | has_skip => FALSE, |
1480 | has_todo => FALSE, |
1481 | number => 136211425, |
1482 | description => '', |
1483 | explanation => '', |
1484 | }, |
1485 | { actual_passed => TRUE, |
1486 | is_actual_ok => TRUE, |
1487 | passed => FALSE, |
1488 | is_ok => FALSE, |
1489 | is_test => TRUE, |
1490 | has_skip => FALSE, |
1491 | has_todo => FALSE, |
1492 | number => 136211426, |
1493 | description => '', |
1494 | explanation => '', |
1495 | }, |
1496 | ], |
1497 | plan => '1..2', |
1498 | passed => [ 1, 2 ], |
1499 | actual_passed => [ 1, 2, 136211425, 136211426 ], |
1500 | failed => [ 136211425, 136211426 ], |
1501 | actual_failed => [], |
1502 | todo => [], |
1503 | todo_passed => [], |
1504 | skipped => [], |
1505 | good_plan => FALSE, |
1506 | tests_planned => 2, |
1507 | tests_run => 4, |
1508 | parse_errors => [ |
1509 | 'Tests out of sequence. Found (136211425) but expected (3)', |
1510 | 'Tests out of sequence. Found (136211426) but expected (4)', |
1511 | 'Bad plan. You planned 2 tests but ran 4.' |
1512 | ], |
1513 | 'exit' => 0, |
1514 | wait => 0, |
1515 | }, |
1516 | bignum_many => { |
1517 | results => [ |
1518 | { is_plan => TRUE, |
1519 | passed => TRUE, |
1520 | is_ok => TRUE, |
1521 | raw => '1..2', |
1522 | tests_planned => 2, |
1523 | }, |
1524 | { actual_passed => TRUE, |
1525 | is_actual_ok => TRUE, |
1526 | passed => TRUE, |
1527 | is_ok => TRUE, |
1528 | is_test => TRUE, |
1529 | has_skip => FALSE, |
1530 | has_todo => FALSE, |
1531 | number => 1, |
1532 | description => '', |
1533 | explanation => '', |
1534 | }, |
1535 | { actual_passed => TRUE, |
1536 | is_actual_ok => TRUE, |
1537 | passed => TRUE, |
1538 | is_ok => TRUE, |
1539 | is_test => TRUE, |
1540 | has_skip => FALSE, |
1541 | has_todo => FALSE, |
1542 | number => 2, |
1543 | description => '', |
1544 | explanation => '', |
1545 | }, |
1546 | { actual_passed => TRUE, |
1547 | is_actual_ok => TRUE, |
1548 | passed => FALSE, |
1549 | is_ok => FALSE, |
1550 | is_test => TRUE, |
1551 | has_skip => FALSE, |
1552 | has_todo => FALSE, |
1553 | number => 99997, |
1554 | description => '', |
1555 | explanation => '', |
1556 | }, |
1557 | { actual_passed => TRUE, |
1558 | is_actual_ok => TRUE, |
1559 | passed => FALSE, |
1560 | is_ok => FALSE, |
1561 | is_test => TRUE, |
1562 | has_skip => FALSE, |
1563 | has_todo => FALSE, |
1564 | number => 99998, |
1565 | description => '', |
1566 | explanation => '', |
1567 | }, |
1568 | { actual_passed => TRUE, |
1569 | is_actual_ok => TRUE, |
1570 | passed => FALSE, |
1571 | is_ok => FALSE, |
1572 | is_test => TRUE, |
1573 | has_skip => FALSE, |
1574 | has_todo => FALSE, |
1575 | number => 99999, |
1576 | description => '', |
1577 | explanation => '', |
1578 | }, |
1579 | { actual_passed => TRUE, |
1580 | is_actual_ok => TRUE, |
1581 | passed => FALSE, |
1582 | is_ok => FALSE, |
1583 | is_test => TRUE, |
1584 | has_skip => FALSE, |
1585 | has_todo => FALSE, |
1586 | number => 100000, |
1587 | description => '', |
1588 | explanation => '', |
1589 | }, |
1590 | { actual_passed => TRUE, |
1591 | is_actual_ok => TRUE, |
1592 | passed => FALSE, |
1593 | is_ok => FALSE, |
1594 | is_test => TRUE, |
1595 | has_skip => FALSE, |
1596 | has_todo => FALSE, |
1597 | number => 100001, |
1598 | description => '', |
1599 | explanation => '', |
1600 | }, |
1601 | { actual_passed => TRUE, |
1602 | is_actual_ok => TRUE, |
1603 | passed => FALSE, |
1604 | is_ok => FALSE, |
1605 | is_test => TRUE, |
1606 | has_skip => FALSE, |
1607 | has_todo => FALSE, |
1608 | number => 100002, |
1609 | description => '', |
1610 | explanation => '', |
1611 | }, |
1612 | { actual_passed => TRUE, |
1613 | is_actual_ok => TRUE, |
1614 | passed => FALSE, |
1615 | is_ok => FALSE, |
1616 | is_test => TRUE, |
1617 | has_skip => FALSE, |
1618 | has_todo => FALSE, |
1619 | number => 100003, |
1620 | description => '', |
1621 | explanation => '', |
1622 | }, |
1623 | { actual_passed => TRUE, |
1624 | is_actual_ok => TRUE, |
1625 | passed => FALSE, |
1626 | is_ok => FALSE, |
1627 | is_test => TRUE, |
1628 | has_skip => FALSE, |
1629 | has_todo => FALSE, |
1630 | number => 100004, |
1631 | description => '', |
1632 | explanation => '', |
1633 | }, |
1634 | { actual_passed => TRUE, |
1635 | is_actual_ok => TRUE, |
1636 | passed => FALSE, |
1637 | is_ok => FALSE, |
1638 | is_test => TRUE, |
1639 | has_skip => FALSE, |
1640 | has_todo => FALSE, |
1641 | number => 100005, |
1642 | description => '', |
1643 | explanation => '', |
1644 | }, |
1645 | ], |
1646 | plan => '1..2', |
1647 | passed => [ 1, 2 ], |
1648 | actual_passed => [ 1, 2, 99997 .. 100005 ], |
1649 | failed => [ 99997 .. 100005 ], |
1650 | actual_failed => [], |
1651 | todo => [], |
1652 | todo_passed => [], |
1653 | skipped => [], |
1654 | good_plan => FALSE, |
1655 | tests_planned => 2, |
1656 | tests_run => 11, |
1657 | parse_errors => [ |
1658 | 'Tests out of sequence. Found (99997) but expected (3)', |
1659 | 'Tests out of sequence. Found (99998) but expected (4)', |
1660 | 'Tests out of sequence. Found (99999) but expected (5)', |
1661 | 'Tests out of sequence. Found (100000) but expected (6)', |
1662 | 'Tests out of sequence. Found (100001) but expected (7)', |
1663 | 'Tests out of sequence. Found (100002) but expected (8)', |
1664 | 'Tests out of sequence. Found (100003) but expected (9)', |
1665 | 'Tests out of sequence. Found (100004) but expected (10)', |
1666 | 'Tests out of sequence. Found (100005) but expected (11)', |
1667 | 'Bad plan. You planned 2 tests but ran 11.' |
1668 | ], |
1669 | 'exit' => 0, |
1670 | wait => 0, |
1671 | }, |
1672 | combined => { |
1673 | results => [ |
1674 | { is_plan => TRUE, |
1675 | passed => TRUE, |
1676 | is_ok => TRUE, |
1677 | raw => '1..10', |
1678 | tests_planned => 10, |
1679 | }, |
1680 | { actual_passed => TRUE, |
1681 | is_actual_ok => TRUE, |
1682 | passed => TRUE, |
1683 | is_ok => TRUE, |
1684 | is_test => TRUE, |
1685 | has_skip => FALSE, |
1686 | has_todo => FALSE, |
1687 | number => 1, |
1688 | description => '', |
1689 | explanation => '', |
1690 | }, |
1691 | { actual_passed => TRUE, |
1692 | is_actual_ok => TRUE, |
1693 | passed => TRUE, |
1694 | is_ok => TRUE, |
1695 | is_test => TRUE, |
1696 | has_skip => FALSE, |
1697 | has_todo => FALSE, |
1698 | number => 2, |
1699 | description => 'basset hounds got long ears', |
1700 | explanation => '', |
1701 | }, |
1702 | { actual_passed => FALSE, |
1703 | is_actual_ok => FALSE, |
1704 | passed => FALSE, |
1705 | is_ok => FALSE, |
1706 | is_test => TRUE, |
1707 | has_skip => FALSE, |
1708 | has_todo => FALSE, |
1709 | number => 3, |
1710 | description => 'all hell broke loose', |
1711 | explanation => '', |
1712 | }, |
1713 | { actual_passed => FALSE, |
1714 | is_actual_ok => FALSE, |
1715 | passed => TRUE, |
1716 | is_ok => TRUE, |
1717 | is_test => TRUE, |
1718 | has_skip => FALSE, |
1719 | has_todo => TRUE, |
1720 | number => 4, |
1721 | description => '', |
1722 | explanation => 'if I heard a voice from heaven ...', |
1723 | }, |
1724 | { actual_passed => TRUE, |
1725 | is_actual_ok => TRUE, |
1726 | passed => TRUE, |
1727 | is_ok => TRUE, |
1728 | is_test => TRUE, |
1729 | has_skip => FALSE, |
1730 | has_todo => FALSE, |
1731 | number => 5, |
1732 | description => 'say "live without loving",', |
1733 | explanation => '', |
1734 | }, |
1735 | { actual_passed => TRUE, |
1736 | is_actual_ok => TRUE, |
1737 | passed => TRUE, |
1738 | is_ok => TRUE, |
1739 | is_test => TRUE, |
1740 | has_skip => FALSE, |
1741 | has_todo => FALSE, |
1742 | number => 6, |
1743 | description => "I'd beg off.", |
1744 | explanation => '', |
1745 | }, |
1746 | { actual_passed => TRUE, |
1747 | is_actual_ok => TRUE, |
1748 | passed => TRUE, |
1749 | is_ok => TRUE, |
1750 | is_test => TRUE, |
1751 | has_skip => '1', |
1752 | has_todo => FALSE, |
1753 | number => 7, |
1754 | description => '', |
1755 | explanation => 'contract negotiations', |
1756 | }, |
1757 | { actual_passed => TRUE, |
1758 | is_actual_ok => TRUE, |
1759 | passed => TRUE, |
1760 | is_ok => TRUE, |
1761 | is_test => TRUE, |
1762 | has_skip => FALSE, |
1763 | has_todo => FALSE, |
1764 | number => 8, |
1765 | description => 'Girls are such exquisite hell', |
1766 | explanation => '', |
1767 | }, |
1768 | { actual_passed => TRUE, |
1769 | is_actual_ok => TRUE, |
1770 | passed => TRUE, |
1771 | is_ok => TRUE, |
1772 | is_test => TRUE, |
1773 | has_skip => FALSE, |
1774 | has_todo => TRUE, |
1775 | number => 9, |
1776 | description => 'Elegy 9B', |
1777 | explanation => '', |
1778 | }, |
1779 | { actual_passed => FALSE, |
1780 | is_actual_ok => FALSE, |
1781 | passed => FALSE, |
1782 | is_ok => FALSE, |
1783 | is_test => TRUE, |
1784 | has_skip => FALSE, |
1785 | has_todo => FALSE, |
1786 | number => 10, |
1787 | description => '', |
1788 | explanation => '', |
1789 | }, |
1790 | ], |
1791 | plan => '1..10', |
1792 | passed => [ 1 .. 2, 4 .. 9 ], |
1793 | actual_passed => [ 1 .. 2, 5 .. 9 ], |
1794 | failed => [ 3, 10 ], |
1795 | actual_failed => [ 3, 4, 10 ], |
1796 | todo => [ 4, 9 ], |
1797 | todo_passed => [9], |
1798 | skipped => [7], |
1799 | good_plan => TRUE, |
1800 | is_good_plan => TRUE, |
1801 | tests_planned => 10, |
1802 | tests_run => 10, |
1803 | parse_errors => [], |
1804 | 'exit' => 0, |
1805 | wait => 0, |
1806 | version => 12, |
1807 | }, |
1808 | head_end => { |
1809 | results => [ |
1810 | { is_comment => TRUE, |
1811 | passed => TRUE, |
1812 | is_ok => TRUE, |
1813 | comment => 'comments', |
1814 | }, |
1815 | { actual_passed => TRUE, |
1816 | is_actual_ok => TRUE, |
1817 | passed => TRUE, |
1818 | is_ok => TRUE, |
1819 | is_test => TRUE, |
1820 | has_skip => FALSE, |
1821 | has_todo => FALSE, |
1822 | number => 1, |
1823 | description => '', |
1824 | explanation => '', |
1825 | }, |
1826 | { actual_passed => TRUE, |
1827 | is_actual_ok => TRUE, |
1828 | passed => TRUE, |
1829 | is_ok => TRUE, |
1830 | is_test => TRUE, |
1831 | has_skip => FALSE, |
1832 | has_todo => FALSE, |
1833 | number => 2, |
1834 | description => '', |
1835 | explanation => '', |
1836 | }, |
1837 | { actual_passed => TRUE, |
1838 | is_actual_ok => TRUE, |
1839 | passed => TRUE, |
1840 | is_ok => TRUE, |
1841 | is_test => TRUE, |
1842 | has_skip => FALSE, |
1843 | has_todo => FALSE, |
1844 | number => 3, |
1845 | description => '', |
1846 | explanation => '', |
1847 | }, |
1848 | { actual_passed => TRUE, |
1849 | is_actual_ok => TRUE, |
1850 | passed => TRUE, |
1851 | is_ok => TRUE, |
1852 | is_test => TRUE, |
1853 | has_skip => FALSE, |
1854 | has_todo => FALSE, |
1855 | number => 4, |
1856 | description => '', |
1857 | explanation => '', |
1858 | }, |
1859 | { is_comment => TRUE, |
1860 | passed => TRUE, |
1861 | is_ok => TRUE, |
1862 | comment => 'comment', |
1863 | }, |
1864 | { is_plan => TRUE, |
1865 | passed => TRUE, |
1866 | is_ok => TRUE, |
1867 | raw => '1..4', |
1868 | tests_planned => 4, |
1869 | }, |
1870 | { is_comment => TRUE, |
1871 | passed => TRUE, |
1872 | is_ok => TRUE, |
1873 | comment => 'more ignored stuff', |
1874 | }, |
1875 | { is_comment => TRUE, |
1876 | passed => TRUE, |
1877 | is_ok => TRUE, |
1878 | comment => 'and yet more', |
1879 | }, |
1880 | ], |
1881 | plan => '1..4', |
1882 | passed => [ 1 .. 4 ], |
1883 | actual_passed => [ 1 .. 4 ], |
1884 | failed => [], |
1885 | actual_failed => [], |
1886 | todo => [], |
1887 | todo_passed => [], |
1888 | skipped => [], |
1889 | good_plan => TRUE, |
1890 | is_good_plan => TRUE, |
1891 | tests_planned => 4, |
1892 | tests_run => 4, |
1893 | parse_errors => [], |
1894 | 'exit' => 0, |
1895 | wait => 0, |
1896 | version => 12, |
1897 | }, |
1898 | head_fail => { |
1899 | results => [ |
1900 | { is_comment => TRUE, |
1901 | passed => TRUE, |
1902 | is_ok => TRUE, |
1903 | comment => 'comments', |
1904 | }, |
1905 | { actual_passed => TRUE, |
1906 | is_actual_ok => TRUE, |
1907 | passed => TRUE, |
1908 | is_ok => TRUE, |
1909 | is_test => TRUE, |
1910 | has_skip => FALSE, |
1911 | has_todo => FALSE, |
1912 | number => 1, |
1913 | description => '', |
1914 | explanation => '', |
1915 | }, |
1916 | { actual_passed => FALSE, |
1917 | is_actual_ok => FALSE, |
1918 | passed => FALSE, |
1919 | is_ok => FALSE, |
1920 | is_test => TRUE, |
1921 | has_skip => FALSE, |
1922 | has_todo => FALSE, |
1923 | number => 2, |
1924 | description => '', |
1925 | explanation => '', |
1926 | }, |
1927 | { actual_passed => TRUE, |
1928 | is_actual_ok => TRUE, |
1929 | passed => TRUE, |
1930 | is_ok => TRUE, |
1931 | is_test => TRUE, |
1932 | has_skip => FALSE, |
1933 | has_todo => FALSE, |
1934 | number => 3, |
1935 | description => '', |
1936 | explanation => '', |
1937 | }, |
1938 | { actual_passed => TRUE, |
1939 | is_actual_ok => TRUE, |
1940 | passed => TRUE, |
1941 | is_ok => TRUE, |
1942 | is_test => TRUE, |
1943 | has_skip => FALSE, |
1944 | has_todo => FALSE, |
1945 | number => 4, |
1946 | description => '', |
1947 | explanation => '', |
1948 | }, |
1949 | { is_comment => TRUE, |
1950 | passed => TRUE, |
1951 | is_ok => TRUE, |
1952 | comment => 'comment', |
1953 | }, |
1954 | { is_plan => TRUE, |
1955 | passed => TRUE, |
1956 | is_ok => TRUE, |
1957 | raw => '1..4', |
1958 | tests_planned => 4, |
1959 | }, |
1960 | { is_comment => TRUE, |
1961 | passed => TRUE, |
1962 | is_ok => TRUE, |
1963 | comment => 'more ignored stuff', |
1964 | }, |
1965 | { is_comment => TRUE, |
1966 | passed => TRUE, |
1967 | is_ok => TRUE, |
1968 | comment => 'and yet more', |
1969 | }, |
1970 | ], |
1971 | plan => '1..4', |
1972 | passed => [ 1, 3, 4 ], |
1973 | actual_passed => [ 1, 3, 4 ], |
1974 | failed => [2], |
1975 | actual_failed => [2], |
1976 | todo => [], |
1977 | todo_passed => [], |
1978 | skipped => [], |
1979 | good_plan => TRUE, |
1980 | is_good_plan => TRUE, |
1981 | tests_planned => 4, |
1982 | tests_run => 4, |
1983 | parse_errors => [], |
1984 | 'exit' => 0, |
1985 | wait => 0, |
1986 | version => 12, |
1987 | }, |
1988 | out_of_order => { |
1989 | results => [ |
1990 | { actual_passed => TRUE, |
1991 | is_actual_ok => TRUE, |
1992 | passed => TRUE, |
1993 | is_ok => TRUE, |
1994 | is_test => TRUE, |
1995 | has_skip => FALSE, |
1996 | has_todo => FALSE, |
1997 | number => 2, |
1998 | description => '- Test that argument passing works', |
1999 | explanation => '', |
2000 | }, |
2001 | { actual_passed => TRUE, |
2002 | is_actual_ok => TRUE, |
2003 | passed => TRUE, |
2004 | is_ok => TRUE, |
2005 | is_test => TRUE, |
2006 | has_skip => FALSE, |
2007 | has_todo => FALSE, |
2008 | number => 3, |
2009 | description => |
2010 | '- Test that passing arguments as references work', |
2011 | explanation => '', |
2012 | }, |
2013 | { actual_passed => TRUE, |
2014 | is_actual_ok => TRUE, |
2015 | passed => TRUE, |
2016 | is_ok => TRUE, |
2017 | is_test => TRUE, |
2018 | has_skip => FALSE, |
2019 | has_todo => FALSE, |
2020 | number => 4, |
2021 | description => '- Test a normal sub', |
2022 | explanation => '', |
2023 | }, |
2024 | { actual_passed => TRUE, |
2025 | is_actual_ok => TRUE, |
2026 | passed => TRUE, |
2027 | is_ok => TRUE, |
2028 | is_test => TRUE, |
2029 | has_skip => FALSE, |
2030 | has_todo => FALSE, |
2031 | number => 6, |
2032 | description => '- Detach test', |
2033 | explanation => '', |
2034 | }, |
2035 | { actual_passed => TRUE, |
2036 | is_actual_ok => TRUE, |
2037 | passed => TRUE, |
2038 | is_ok => TRUE, |
2039 | is_test => TRUE, |
2040 | has_skip => FALSE, |
2041 | has_todo => FALSE, |
2042 | number => 8, |
2043 | description => '- Nested thread test', |
2044 | explanation => '', |
2045 | }, |
2046 | { actual_passed => TRUE, |
2047 | is_actual_ok => TRUE, |
2048 | passed => TRUE, |
2049 | is_ok => TRUE, |
2050 | is_test => TRUE, |
2051 | has_skip => FALSE, |
2052 | has_todo => FALSE, |
2053 | number => 9, |
2054 | description => '- Nested thread test', |
2055 | explanation => '', |
2056 | }, |
2057 | { actual_passed => TRUE, |
2058 | is_actual_ok => TRUE, |
2059 | passed => TRUE, |
2060 | is_ok => TRUE, |
2061 | is_test => TRUE, |
2062 | has_skip => FALSE, |
2063 | has_todo => FALSE, |
2064 | number => 10, |
2065 | description => '- Wanted 7, got 7', |
2066 | explanation => '', |
2067 | }, |
2068 | { actual_passed => TRUE, |
2069 | is_actual_ok => TRUE, |
2070 | passed => TRUE, |
2071 | is_ok => TRUE, |
2072 | is_test => TRUE, |
2073 | has_skip => FALSE, |
2074 | has_todo => FALSE, |
2075 | number => 11, |
2076 | description => '- Wanted 7, got 7', |
2077 | explanation => '', |
2078 | }, |
2079 | { actual_passed => TRUE, |
2080 | is_actual_ok => TRUE, |
2081 | passed => TRUE, |
2082 | is_ok => TRUE, |
2083 | is_test => TRUE, |
2084 | has_skip => FALSE, |
2085 | has_todo => FALSE, |
2086 | number => 12, |
2087 | description => '- Wanted 8, got 8', |
2088 | explanation => '', |
2089 | }, |
2090 | { actual_passed => TRUE, |
2091 | is_actual_ok => TRUE, |
2092 | passed => TRUE, |
2093 | is_ok => TRUE, |
2094 | is_test => TRUE, |
2095 | has_skip => FALSE, |
2096 | has_todo => FALSE, |
2097 | number => 13, |
2098 | description => '- Wanted 8, got 8', |
2099 | explanation => '', |
2100 | }, |
2101 | { is_plan => TRUE, |
2102 | passed => TRUE, |
2103 | is_ok => TRUE, |
2104 | raw => '1..15', |
2105 | tests_planned => 15, |
2106 | }, |
2107 | { actual_passed => TRUE, |
2108 | is_actual_ok => TRUE, |
2109 | passed => TRUE, |
2110 | is_ok => TRUE, |
2111 | is_test => TRUE, |
2112 | has_skip => FALSE, |
2113 | has_todo => FALSE, |
2114 | number => 1, |
2115 | description => '', |
2116 | explanation => '', |
2117 | }, |
2118 | { actual_passed => TRUE, |
2119 | is_actual_ok => TRUE, |
2120 | passed => TRUE, |
2121 | is_ok => TRUE, |
2122 | is_test => TRUE, |
2123 | has_skip => FALSE, |
2124 | has_todo => FALSE, |
2125 | number => 5, |
2126 | description => '- Check that Config::threads is true', |
2127 | explanation => '', |
2128 | }, |
2129 | { actual_passed => TRUE, |
2130 | is_actual_ok => TRUE, |
2131 | passed => TRUE, |
2132 | is_ok => TRUE, |
2133 | is_test => TRUE, |
2134 | has_skip => FALSE, |
2135 | has_todo => FALSE, |
2136 | number => 7, |
2137 | description => '- Detach test', |
2138 | explanation => '', |
2139 | }, |
2140 | { actual_passed => TRUE, |
2141 | is_actual_ok => TRUE, |
2142 | passed => TRUE, |
2143 | is_ok => TRUE, |
2144 | is_test => TRUE, |
2145 | has_skip => FALSE, |
2146 | has_todo => FALSE, |
2147 | number => 14, |
2148 | description => |
2149 | '- Check so that tid for threads work for main thread', |
2150 | explanation => '', |
2151 | }, |
2152 | { actual_passed => TRUE, |
2153 | is_actual_ok => TRUE, |
2154 | passed => TRUE, |
2155 | is_ok => TRUE, |
2156 | is_test => TRUE, |
2157 | has_skip => FALSE, |
2158 | has_todo => FALSE, |
2159 | number => 15, |
2160 | description => |
2161 | '- Check so that tid for threads work for main thread', |
2162 | explanation => '', |
2163 | }, |
2164 | ], |
2165 | plan => '1..15', |
2166 | passed => [ 2 .. 4, 6, 8 .. 13, 1, 5, 7, 14, 15 ], |
2167 | actual_passed => [ 2 .. 4, 6, 8 .. 13, 1, 5, 7, 14, 15 ], |
2168 | failed => [], |
2169 | actual_failed => [], |
2170 | todo => [], |
2171 | todo_passed => [], |
2172 | skipped => [], |
2173 | is_good_plan => FALSE, |
2174 | tests_planned => 15, |
2175 | tests_run => 15, |
2176 | |
2177 | # Note that tests 14 and 15 *are* in the correct sequence. |
2178 | parse_errors => [ |
2179 | 'Tests out of sequence. Found (2) but expected (1)', |
2180 | 'Tests out of sequence. Found (3) but expected (2)', |
2181 | 'Tests out of sequence. Found (4) but expected (3)', |
2182 | 'Tests out of sequence. Found (6) but expected (4)', |
2183 | 'Tests out of sequence. Found (8) but expected (5)', |
2184 | 'Tests out of sequence. Found (9) but expected (6)', |
2185 | 'Tests out of sequence. Found (10) but expected (7)', |
2186 | 'Tests out of sequence. Found (11) but expected (8)', |
2187 | 'Tests out of sequence. Found (12) but expected (9)', |
2188 | 'Tests out of sequence. Found (13) but expected (10)', |
2189 | 'Plan (1..15) must be at the beginning or end of the TAP output', |
2190 | 'Tests out of sequence. Found (1) but expected (11)', |
2191 | 'Tests out of sequence. Found (5) but expected (12)', |
2192 | 'Tests out of sequence. Found (7) but expected (13)', |
2193 | ], |
2194 | 'exit' => 0, |
2195 | wait => 0, |
2196 | }, |
2197 | skipall => { |
2198 | results => [ |
2199 | { is_plan => TRUE, |
2200 | raw => '1..0 # skipping: rope', |
2201 | tests_planned => 0, |
2202 | passed => TRUE, |
2203 | is_ok => TRUE, |
2204 | directive => 'SKIP', |
f7c69158 |
2205 | explanation => '' |
b965d173 |
2206 | }, |
2207 | ], |
2208 | plan => '1..0', |
2209 | passed => [], |
2210 | actual_passed => [], |
2211 | failed => [], |
2212 | actual_failed => [], |
2213 | todo => [], |
2214 | todo_passed => [], |
2215 | skipped => [], |
2216 | good_plan => TRUE, |
2217 | is_good_plan => TRUE, |
2218 | tests_planned => 0, |
2219 | tests_run => 0, |
2220 | parse_errors => [], |
2221 | 'exit' => 0, |
2222 | wait => 0, |
2223 | version => 12, |
f7c69158 |
2224 | skip_all => '(no reason given)', |
b965d173 |
2225 | }, |
2226 | skipall_v13 => { |
2227 | results => [ |
2228 | { is_version => TRUE, |
2229 | raw => 'TAP version 13', |
2230 | }, |
2231 | { is_unknown => TRUE, |
2232 | raw => '1..0 # skipping: rope', |
2233 | }, |
2234 | ], |
2235 | plan => '', |
2236 | passed => [], |
2237 | actual_passed => [], |
2238 | failed => [], |
2239 | actual_failed => [], |
2240 | todo => [], |
2241 | todo_passed => [], |
2242 | skipped => [], |
2243 | good_plan => FALSE, |
2244 | is_good_plan => FALSE, |
2245 | tests_planned => FALSE, |
2246 | tests_run => 0, |
2247 | parse_errors => ['No plan found in TAP output'], |
2248 | 'exit' => 0, |
2249 | wait => 0, |
2250 | version => 13, |
2251 | }, |
2a7f4b9b |
2252 | strict => { |
2253 | results => [ |
2254 | { is_version => TRUE, |
2255 | raw => 'TAP version 13', |
2256 | }, |
2257 | { is_plan => TRUE, |
2258 | raw => '1..1', |
2259 | }, |
2260 | { is_pragma => TRUE, |
2261 | raw => 'pragma +strict', |
2262 | pragmas => ['+strict'], |
2263 | }, |
2264 | { is_unknown => TRUE, raw => 'Nonsense!', |
2265 | }, |
2266 | { is_pragma => TRUE, |
2267 | raw => 'pragma -strict', |
2268 | pragmas => ['-strict'], |
2269 | }, |
2270 | { is_unknown => TRUE, |
2271 | raw => "Doesn't matter.", |
2272 | }, |
2273 | { is_test => TRUE, |
2274 | raw => 'ok 1 All OK', |
2275 | } |
2276 | ], |
2277 | plan => '1..1', |
2278 | passed => [1], |
2279 | actual_passed => [1], |
2280 | failed => [], |
2281 | actual_failed => [], |
2282 | todo => [], |
2283 | todo_passed => [], |
2284 | skipped => [], |
2285 | good_plan => TRUE, |
2286 | is_good_plan => TRUE, |
2287 | tests_planned => 1, |
2288 | tests_run => 1, |
2289 | parse_errors => ['Unknown TAP token: "Nonsense!"'], |
2290 | 'exit' => 0, # TODO: Is this right??? |
2291 | wait => 0, |
2292 | version => 13, |
2293 | }, |
b965d173 |
2294 | skipall_nomsg => { |
2295 | results => [ |
2296 | { is_plan => TRUE, |
2297 | raw => '1..0', |
2298 | tests_planned => 0, |
2299 | passed => TRUE, |
2300 | is_ok => TRUE, |
2301 | directive => 'SKIP', |
2302 | explanation => '' |
2303 | }, |
2304 | ], |
2305 | plan => '1..0', |
2306 | passed => [], |
2307 | actual_passed => [], |
2308 | failed => [], |
2309 | actual_failed => [], |
2310 | todo => [], |
2311 | todo_passed => [], |
2312 | skipped => [], |
2313 | good_plan => TRUE, |
2314 | is_good_plan => TRUE, |
2315 | tests_planned => 0, |
2316 | tests_run => 0, |
2317 | parse_errors => [], |
2318 | 'exit' => 0, |
2319 | wait => 0, |
2320 | version => 12, |
2321 | skip_all => '(no reason given)', |
2322 | }, |
2323 | todo_misparse => { |
2324 | results => [ |
2325 | { is_plan => TRUE, |
2326 | raw => '1..1', |
2327 | tests_planned => TRUE, |
2328 | passed => TRUE, |
2329 | is_ok => TRUE, |
2330 | }, |
2331 | { actual_passed => FALSE, |
2332 | is_actual_ok => FALSE, |
2333 | passed => FALSE, |
2334 | is_ok => FALSE, |
2335 | is_test => TRUE, |
2336 | has_skip => FALSE, |
2337 | has_todo => FALSE, |
2338 | number => 1, |
2339 | description => 'Hamlette # TODOORNOTTODO', |
2340 | explanation => '', |
2341 | }, |
2342 | ], |
2343 | plan => '1..1', |
2344 | passed => [], |
2345 | actual_passed => [], |
2346 | failed => [1], |
2347 | actual_failed => [1], |
2348 | todo => [], |
2349 | todo_passed => [], |
2350 | skipped => [], |
2351 | good_plan => TRUE, |
2352 | is_good_plan => TRUE, |
2353 | tests_planned => TRUE, |
2354 | tests_run => 1, |
2355 | parse_errors => [], |
2356 | 'exit' => 0, |
2357 | wait => 0, |
2358 | version => 12, |
2359 | }, |
2360 | shbang_misparse => { |
2361 | results => [ |
2362 | { is_plan => TRUE, |
2363 | raw => '1..2', |
2364 | tests_planned => 2, |
2365 | passed => TRUE, |
2366 | is_ok => TRUE, |
2367 | }, |
2368 | { actual_passed => TRUE, |
2369 | is_actual_ok => TRUE, |
2370 | description => "", |
2371 | passed => TRUE, |
2372 | is_ok => TRUE, |
2373 | is_test => TRUE, |
2374 | has_skip => FALSE, |
2375 | has_todo => FALSE, |
2376 | number => 1, |
2377 | }, |
2378 | { actual_passed => TRUE, |
2379 | is_actual_ok => TRUE, |
2380 | passed => TRUE, |
2381 | is_ok => TRUE, |
2382 | is_test => TRUE, |
2383 | has_skip => FALSE, |
2384 | has_todo => FALSE, |
2385 | number => 2, |
2386 | description => "", |
2387 | }, |
2388 | ], |
2389 | plan => '1..2', |
2390 | passed => [ 1 .. 2 ], |
2391 | actual_passed => [ 1 .. 2 ], |
2392 | failed => [], |
2393 | actual_failed => [], |
2394 | todo => [], |
2395 | todo_passed => [], |
2396 | skipped => [], |
2397 | good_plan => TRUE, |
2398 | is_good_plan => TRUE, |
2399 | tests_planned => 2, |
2400 | tests_run => 2, |
2401 | parse_errors => [], |
2402 | 'exit' => 0, |
2403 | wait => 0, |
2404 | version => 12, |
2405 | }, |
69f36734 |
2406 | switches => { |
2407 | results => [ |
2408 | { is_plan => TRUE, |
2409 | passed => TRUE, |
2410 | is_ok => TRUE, |
2411 | raw => '1..1', |
2412 | tests_planned => 1, |
2413 | }, |
2414 | { actual_passed => TRUE, |
2415 | is_actual_ok => TRUE, |
2416 | passed => TRUE, |
2417 | is_ok => TRUE, |
2418 | is_test => TRUE, |
2419 | has_skip => FALSE, |
2420 | has_todo => FALSE, |
2421 | number => 1, |
2422 | description => "", |
2423 | explanation => '', |
2424 | }, |
2425 | ], |
2426 | __ARGS__ => { switches => ['-Mstrict'] }, |
2427 | plan => '1..1', |
2428 | passed => [1], |
2429 | actual_passed => [1], |
2430 | failed => [], |
2431 | actual_failed => [], |
2432 | todo => [], |
2433 | todo_passed => [], |
2434 | skipped => [], |
2435 | good_plan => TRUE, |
2436 | is_good_plan => TRUE, |
2437 | tests_planned => 1, |
2438 | tests_run => TRUE, |
2439 | parse_errors => [], |
2440 | 'exit' => 0, |
2441 | wait => 0, |
2442 | version => 12, |
2443 | }, |
b965d173 |
2444 | inc_taint => { |
2445 | results => [ |
2446 | { is_plan => TRUE, |
2447 | passed => TRUE, |
2448 | is_ok => TRUE, |
2449 | raw => '1..1', |
2450 | tests_planned => 1, |
2451 | }, |
2452 | { actual_passed => TRUE, |
2453 | is_actual_ok => TRUE, |
2454 | passed => TRUE, |
2455 | is_ok => TRUE, |
2456 | is_test => TRUE, |
2457 | has_skip => FALSE, |
2458 | has_todo => FALSE, |
2459 | number => 1, |
2460 | description => "", |
2461 | explanation => '', |
2462 | }, |
2463 | ], |
2464 | __ARGS__ => { switches => ['-Iexamples'] }, |
2465 | plan => '1..1', |
2466 | passed => [1], |
2467 | actual_passed => [1], |
2468 | failed => [], |
2469 | actual_failed => [], |
2470 | todo => [], |
2471 | todo_passed => [], |
2472 | skipped => [], |
2473 | good_plan => TRUE, |
2474 | is_good_plan => TRUE, |
2475 | tests_planned => 1, |
2476 | tests_run => TRUE, |
2477 | parse_errors => [], |
2478 | 'exit' => 0, |
2479 | wait => 0, |
2480 | version => 12, |
2481 | }, |
2482 | sequence_misparse => { |
2483 | results => [ |
2484 | { is_plan => TRUE, |
2485 | raw => '1..5', |
2486 | tests_planned => 5, |
2487 | passed => TRUE, |
2488 | is_ok => TRUE, |
2489 | }, |
2490 | { actual_passed => TRUE, |
2491 | is_actual_ok => TRUE, |
2492 | passed => TRUE, |
2493 | is_ok => TRUE, |
2494 | is_test => TRUE, |
2495 | has_skip => FALSE, |
2496 | has_todo => FALSE, |
2497 | number => 1, |
2498 | description => "", |
2499 | }, |
2500 | { actual_passed => TRUE, |
2501 | is_actual_ok => TRUE, |
2502 | passed => TRUE, |
2503 | is_ok => TRUE, |
2504 | is_test => TRUE, |
2505 | has_skip => FALSE, |
2506 | has_todo => FALSE, |
2507 | number => 2, |
2508 | description => "", |
2509 | }, |
2510 | { actual_passed => TRUE, |
2511 | is_actual_ok => TRUE, |
2512 | passed => TRUE, |
2513 | is_ok => TRUE, |
2514 | is_test => TRUE, |
2515 | has_skip => FALSE, |
2516 | has_todo => FALSE, |
2517 | number => 3, |
2518 | description => "\# skipped on foobar system", |
2519 | }, |
2520 | { is_comment => TRUE, |
2521 | comment => '1234567890123456789012345678901234567890', |
2522 | }, |
2523 | { actual_passed => TRUE, |
2524 | is_actual_ok => TRUE, |
2525 | passed => TRUE, |
2526 | is_ok => TRUE, |
2527 | is_test => TRUE, |
2528 | has_skip => FALSE, |
2529 | has_todo => FALSE, |
2530 | number => 4, |
2531 | description => "", |
2532 | }, |
2533 | { is_comment => TRUE, |
2534 | comment => '1234567890123456789012345678901234567890', |
2535 | }, |
2536 | { actual_passed => TRUE, |
2537 | is_actual_ok => TRUE, |
2538 | passed => TRUE, |
2539 | is_ok => TRUE, |
2540 | is_test => TRUE, |
2541 | has_skip => FALSE, |
2542 | has_todo => FALSE, |
2543 | number => 5, |
2544 | description => "", |
2545 | }, |
2546 | ], |
2547 | plan => '1..5', |
2548 | passed => [ 1 .. 5 ], |
2549 | actual_passed => [ 1 .. 5 ], |
2550 | failed => [], |
2551 | actual_failed => [], |
2552 | todo => [], |
2553 | todo_passed => [], |
2554 | skipped => [], |
2555 | good_plan => TRUE, |
2556 | is_good_plan => TRUE, |
2557 | tests_planned => 5, |
2558 | tests_run => 5, |
2559 | parse_errors => [], |
2560 | 'exit' => 0, |
2561 | wait => 0, |
2562 | version => 12, |
2563 | }, |
2564 | |
2565 | stdout_stderr => { |
2566 | results => [ |
2567 | { is_comment => TRUE, |
2568 | passed => TRUE, |
2569 | is_ok => TRUE, |
2570 | comment => 'comments', |
2571 | }, |
2572 | { actual_passed => TRUE, |
2573 | is_actual_ok => TRUE, |
2574 | passed => TRUE, |
2575 | is_ok => TRUE, |
2576 | is_test => TRUE, |
2577 | has_skip => FALSE, |
2578 | has_todo => FALSE, |
2579 | number => 1, |
2580 | description => '', |
2581 | explanation => '', |
2582 | }, |
2583 | { actual_passed => TRUE, |
2584 | is_actual_ok => TRUE, |
2585 | passed => TRUE, |
2586 | is_ok => TRUE, |
2587 | is_test => TRUE, |
2588 | has_skip => FALSE, |
2589 | has_todo => FALSE, |
2590 | number => 2, |
2591 | description => '', |
2592 | explanation => '', |
2593 | }, |
2594 | { actual_passed => TRUE, |
2595 | is_actual_ok => TRUE, |
2596 | passed => TRUE, |
2597 | is_ok => TRUE, |
2598 | is_test => TRUE, |
2599 | has_skip => FALSE, |
2600 | has_todo => FALSE, |
2601 | number => 3, |
2602 | description => '', |
2603 | explanation => '', |
2604 | }, |
2605 | { is_comment => TRUE, |
2606 | passed => TRUE, |
2607 | is_ok => TRUE, |
2608 | comment => 'comment', |
2609 | }, |
2610 | { actual_passed => TRUE, |
2611 | is_actual_ok => TRUE, |
2612 | passed => TRUE, |
2613 | is_ok => TRUE, |
2614 | is_test => TRUE, |
2615 | has_skip => FALSE, |
2616 | has_todo => FALSE, |
2617 | number => 4, |
2618 | description => '', |
2619 | explanation => '', |
2620 | }, |
2621 | { is_comment => TRUE, |
2622 | passed => TRUE, |
2623 | is_ok => TRUE, |
2624 | comment => 'more ignored stuff', |
2625 | }, |
2626 | { is_comment => TRUE, |
2627 | passed => TRUE, |
2628 | is_ok => TRUE, |
2629 | comment => 'and yet more', |
2630 | }, |
2631 | { is_plan => TRUE, |
2632 | passed => TRUE, |
2633 | is_ok => TRUE, |
2634 | raw => '1..4', |
2635 | tests_planned => 4, |
2636 | }, |
2637 | ], |
2638 | plan => '1..4', |
2639 | passed => [ 1 .. 4 ], |
2640 | actual_passed => [ 1 .. 4 ], |
2641 | failed => [], |
2642 | actual_failed => [], |
2643 | todo => [], |
2644 | todo_passed => [], |
2645 | skipped => [], |
2646 | good_plan => TRUE, |
2647 | is_good_plan => TRUE, |
2648 | tests_planned => 4, |
2649 | tests_run => 4, |
2650 | parse_errors => [], |
2651 | 'exit' => 0, |
2652 | wait => 0, |
2653 | version => 12, |
2654 | need_open3 => 1, |
2655 | }, |
2656 | |
2657 | junk_before_plan => { |
2658 | results => [ |
2659 | { is_unknown => TRUE, |
2660 | raw => 'this is junk', |
2661 | }, |
2662 | { is_comment => TRUE, |
2663 | comment => "this is a comment", |
2664 | }, |
2665 | { is_plan => TRUE, |
2666 | passed => TRUE, |
2667 | is_ok => TRUE, |
2668 | raw => '1..1', |
2669 | tests_planned => 1, |
2670 | }, |
2671 | { actual_passed => TRUE, |
2672 | is_actual_ok => TRUE, |
2673 | passed => TRUE, |
2674 | is_ok => TRUE, |
2675 | is_test => TRUE, |
2676 | has_skip => FALSE, |
2677 | has_todo => FALSE, |
2678 | number => 1, |
2679 | }, |
2680 | ], |
2681 | plan => '1..1', |
2682 | passed => [ 1 .. 1 ], |
2683 | actual_passed => [ 1 .. 1 ], |
2684 | failed => [], |
2685 | actual_failed => [], |
2686 | todo => [], |
2687 | todo_passed => [], |
2688 | skipped => [], |
2689 | good_plan => TRUE, |
2690 | is_good_plan => TRUE, |
2691 | tests_planned => 1, |
2692 | tests_run => 1, |
2693 | parse_errors => [], |
2694 | 'exit' => 0, |
2695 | wait => 0, |
2696 | version => 12, |
2697 | }, |
2698 | version_good => { |
2699 | results => [ |
2700 | { is_version => TRUE, |
2701 | raw => 'TAP version 13', |
2702 | }, |
2703 | { is_plan => TRUE, |
2704 | raw => '1..5', |
2705 | tests_planned => 5, |
2706 | passed => TRUE, |
2707 | is_ok => TRUE, |
2708 | }, |
2709 | { actual_passed => TRUE, |
2710 | is_actual_ok => TRUE, |
2711 | passed => TRUE, |
2712 | is_ok => TRUE, |
2713 | is_test => TRUE, |
2714 | has_skip => FALSE, |
2715 | has_todo => FALSE, |
2716 | number => 1, |
2717 | description => "", |
2718 | }, |
2719 | { actual_passed => TRUE, |
2720 | is_actual_ok => TRUE, |
2721 | passed => TRUE, |
2722 | is_ok => TRUE, |
2723 | is_test => TRUE, |
2724 | has_skip => FALSE, |
2725 | has_todo => FALSE, |
2726 | number => 2, |
2727 | description => "", |
2728 | }, |
2729 | { actual_passed => TRUE, |
2730 | is_actual_ok => TRUE, |
2731 | passed => TRUE, |
2732 | is_ok => TRUE, |
2733 | is_test => TRUE, |
2734 | has_skip => FALSE, |
2735 | has_todo => FALSE, |
2736 | number => 3, |
2737 | description => "", |
2738 | }, |
2739 | { actual_passed => TRUE, |
2740 | is_actual_ok => TRUE, |
2741 | passed => TRUE, |
2742 | is_ok => TRUE, |
2743 | is_test => TRUE, |
2744 | has_skip => FALSE, |
2745 | has_todo => FALSE, |
2746 | number => 4, |
2747 | description => "", |
2748 | }, |
2749 | { actual_passed => TRUE, |
2750 | is_actual_ok => TRUE, |
2751 | passed => TRUE, |
2752 | is_ok => TRUE, |
2753 | is_test => TRUE, |
2754 | has_skip => FALSE, |
2755 | has_todo => FALSE, |
2756 | number => 5, |
2757 | description => "", |
2758 | }, |
2759 | ], |
2760 | plan => '1..5', |
2761 | passed => [ 1 .. 5 ], |
2762 | actual_passed => [ 1 .. 5 ], |
2763 | failed => [], |
2764 | actual_failed => [], |
2765 | todo => [], |
2766 | todo_passed => [], |
2767 | skipped => [], |
2768 | good_plan => TRUE, |
2769 | is_good_plan => TRUE, |
2770 | tests_planned => 5, |
2771 | tests_run => 5, |
2772 | parse_errors => [], |
2773 | 'exit' => 0, |
2774 | wait => 0, |
2775 | version => 13, |
2776 | }, |
2777 | version_old => { |
2778 | results => [ |
2779 | { is_version => TRUE, |
2780 | raw => 'TAP version 12', |
2781 | }, |
2782 | { is_plan => TRUE, |
2783 | raw => '1..5', |
2784 | tests_planned => 5, |
2785 | passed => TRUE, |
2786 | is_ok => TRUE, |
2787 | }, |
2788 | { actual_passed => TRUE, |
2789 | is_actual_ok => TRUE, |
2790 | passed => TRUE, |
2791 | is_ok => TRUE, |
2792 | is_test => TRUE, |
2793 | has_skip => FALSE, |
2794 | has_todo => FALSE, |
2795 | number => 1, |
2796 | description => "", |
2797 | }, |
2798 | { actual_passed => TRUE, |
2799 | is_actual_ok => TRUE, |
2800 | passed => TRUE, |
2801 | is_ok => TRUE, |
2802 | is_test => TRUE, |
2803 | has_skip => FALSE, |
2804 | has_todo => FALSE, |
2805 | number => 2, |
2806 | description => "", |
2807 | }, |
2808 | { actual_passed => TRUE, |
2809 | is_actual_ok => TRUE, |
2810 | passed => TRUE, |
2811 | is_ok => TRUE, |
2812 | is_test => TRUE, |
2813 | has_skip => FALSE, |
2814 | has_todo => FALSE, |
2815 | number => 3, |
2816 | description => "", |
2817 | }, |
2818 | { actual_passed => TRUE, |
2819 | is_actual_ok => TRUE, |
2820 | passed => TRUE, |
2821 | is_ok => TRUE, |
2822 | is_test => TRUE, |
2823 | has_skip => FALSE, |
2824 | has_todo => FALSE, |
2825 | number => 4, |
2826 | description => "", |
2827 | }, |
2828 | { actual_passed => TRUE, |
2829 | is_actual_ok => TRUE, |
2830 | passed => TRUE, |
2831 | is_ok => TRUE, |
2832 | is_test => TRUE, |
2833 | has_skip => FALSE, |
2834 | has_todo => FALSE, |
2835 | number => 5, |
2836 | description => "", |
2837 | }, |
2838 | ], |
2839 | plan => '1..5', |
2840 | passed => [ 1 .. 5 ], |
2841 | actual_passed => [ 1 .. 5 ], |
2842 | failed => [], |
2843 | actual_failed => [], |
2844 | todo => [], |
2845 | todo_passed => [], |
2846 | skipped => [], |
2847 | good_plan => TRUE, |
2848 | is_good_plan => TRUE, |
2849 | tests_planned => 5, |
2850 | tests_run => 5, |
2851 | parse_errors => |
2a7f4b9b |
2852 | ['Explicit TAP version must be at least 13. Got version 12'], |
b965d173 |
2853 | 'exit' => 0, |
2854 | wait => 0, |
2855 | version => 12, |
2856 | }, |
2857 | version_late => { |
2858 | results => [ |
2859 | { is_plan => TRUE, |
2860 | raw => '1..5', |
2861 | tests_planned => 5, |
2862 | passed => TRUE, |
2863 | is_ok => TRUE, |
2864 | }, |
2865 | { is_version => TRUE, |
2866 | raw => 'TAP version 13', |
2867 | }, |
2868 | { actual_passed => TRUE, |
2869 | is_actual_ok => TRUE, |
2870 | passed => TRUE, |
2871 | is_ok => TRUE, |
2872 | is_test => TRUE, |
2873 | has_skip => FALSE, |
2874 | has_todo => FALSE, |
2875 | number => 1, |
2876 | description => "", |
2877 | }, |
2878 | { actual_passed => TRUE, |
2879 | is_actual_ok => TRUE, |
2880 | passed => TRUE, |
2881 | is_ok => TRUE, |
2882 | is_test => TRUE, |
2883 | has_skip => FALSE, |
2884 | has_todo => FALSE, |
2885 | number => 2, |
2886 | description => "", |
2887 | }, |
2888 | { actual_passed => TRUE, |
2889 | is_actual_ok => TRUE, |
2890 | passed => TRUE, |
2891 | is_ok => TRUE, |
2892 | is_test => TRUE, |
2893 | has_skip => FALSE, |
2894 | has_todo => FALSE, |
2895 | number => 3, |
2896 | description => "", |
2897 | }, |
2898 | { actual_passed => TRUE, |
2899 | is_actual_ok => TRUE, |
2900 | passed => TRUE, |
2901 | is_ok => TRUE, |
2902 | is_test => TRUE, |
2903 | has_skip => FALSE, |
2904 | has_todo => FALSE, |
2905 | number => 4, |
2906 | description => "", |
2907 | }, |
2908 | { actual_passed => TRUE, |
2909 | is_actual_ok => TRUE, |
2910 | passed => TRUE, |
2911 | is_ok => TRUE, |
2912 | is_test => TRUE, |
2913 | has_skip => FALSE, |
2914 | has_todo => FALSE, |
2915 | number => 5, |
2916 | description => "", |
2917 | }, |
2918 | ], |
2919 | plan => '1..5', |
2920 | passed => [ 1 .. 5 ], |
2921 | actual_passed => [ 1 .. 5 ], |
2922 | failed => [], |
2923 | actual_failed => [], |
2924 | todo => [], |
2925 | todo_passed => [], |
2926 | skipped => [], |
2927 | good_plan => TRUE, |
2928 | is_good_plan => TRUE, |
2929 | tests_planned => 5, |
2930 | tests_run => 5, |
2931 | parse_errors => |
2a7f4b9b |
2932 | ['If TAP version is present it must be the first line of output'], |
b965d173 |
2933 | 'exit' => 0, |
2934 | wait => 0, |
2935 | version => 12, |
2936 | }, |
2937 | |
2938 | escape_eol => { |
2939 | results => [ |
2940 | { is_plan => TRUE, |
2941 | raw => '1..2', |
2942 | tests_planned => 2, |
2943 | passed => TRUE, |
2944 | is_ok => TRUE, |
2945 | }, |
2946 | { actual_passed => TRUE, |
2947 | is_actual_ok => TRUE, |
2948 | description => |
2949 | 'Should parse as literal backslash --> \\', |
2950 | passed => TRUE, |
2951 | is_ok => TRUE, |
2952 | is_test => TRUE, |
2953 | has_skip => FALSE, |
2954 | has_todo => FALSE, |
2955 | number => 1, |
2956 | is_unplanned => FALSE, |
2957 | }, |
2958 | { actual_passed => TRUE, |
2959 | is_actual_ok => TRUE, |
2960 | passed => TRUE, |
2961 | is_ok => TRUE, |
2962 | is_test => TRUE, |
2963 | has_skip => FALSE, |
2964 | has_todo => FALSE, |
2965 | number => 2, |
2966 | description => 'Not a continuation line', |
2967 | is_unplanned => FALSE, |
2968 | }, |
2969 | ], |
2970 | plan => '1..2', |
2971 | passed => [ 1 .. 2 ], |
2972 | actual_passed => [ 1 .. 2 ], |
2973 | failed => [], |
2974 | actual_failed => [], |
2975 | todo => [], |
2976 | todo_passed => [], |
2977 | skipped => [], |
2978 | good_plan => TRUE, |
2979 | is_good_plan => TRUE, |
2980 | tests_planned => 2, |
2981 | tests_run => 2, |
2982 | parse_errors => [], |
2983 | 'exit' => 0, |
2984 | wait => 0, |
2985 | version => 12, |
2986 | }, |
2987 | |
2988 | escape_hash => { |
2989 | results => [ |
2990 | { is_plan => TRUE, |
2991 | raw => '1..3', |
2992 | tests_planned => 3, |
2993 | passed => TRUE, |
2994 | is_ok => TRUE, |
2995 | }, |
2996 | { actual_passed => TRUE, |
2997 | is_actual_ok => TRUE, |
2998 | description => 'Not a \\# TODO', |
2999 | passed => TRUE, |
3000 | is_ok => TRUE, |
3001 | is_test => TRUE, |
3002 | has_skip => FALSE, |
3003 | has_todo => FALSE, |
3004 | number => 1, |
3005 | is_unplanned => FALSE, |
3006 | }, |
3007 | { actual_passed => TRUE, |
3008 | is_actual_ok => TRUE, |
3009 | passed => TRUE, |
3010 | is_ok => TRUE, |
3011 | is_test => TRUE, |
3012 | has_skip => FALSE, |
3013 | has_todo => FALSE, |
3014 | number => 2, |
3015 | description => 'Not a \\# SKIP', |
3016 | is_unplanned => FALSE, |
3017 | }, |
3018 | { actual_passed => TRUE, |
3019 | is_actual_ok => TRUE, |
3020 | passed => TRUE, |
3021 | is_ok => TRUE, |
3022 | is_test => TRUE, |
3023 | has_skip => FALSE, |
3024 | has_todo => FALSE, |
3025 | number => 3, |
3026 | description => 'Escaped \\\\\\#', |
3027 | is_unplanned => FALSE, |
3028 | }, |
3029 | ], |
3030 | plan => '1..3', |
3031 | passed => [ 1 .. 3 ], |
3032 | actual_passed => [ 1 .. 3 ], |
3033 | failed => [], |
3034 | actual_failed => [], |
3035 | todo => [], |
3036 | todo_passed => [], |
3037 | skipped => [], |
3038 | good_plan => TRUE, |
3039 | is_good_plan => TRUE, |
3040 | tests_planned => 3, |
3041 | tests_run => 3, |
3042 | parse_errors => [], |
3043 | 'exit' => 0, |
3044 | wait => 0, |
3045 | version => 12, |
3046 | }, |
3047 | ); |
3048 | |
3049 | my %HANDLER_FOR = ( |
3050 | NOT_ZERO, sub { local $^W; 0 != shift }, |
3051 | TRUE, sub { local $^W; !!shift }, |
3052 | FALSE, sub { local $^W; !shift }, |
3053 | ); |
3054 | |
3055 | my $can_open3 = ( $Config{d_fork} || $IsWin32 ) ? 1 : 0; |
3056 | |
3057 | for my $hide_fork ( 0 .. $can_open3 ) { |
3058 | if ($hide_fork) { |
3059 | no strict 'refs'; |
3060 | local $^W = 0; |
3061 | *{'TAP::Parser::Iterator::Process::_use_open3'} = sub {return}; |
3062 | } |
3063 | |
3064 | TEST: |
3065 | for my $test ( sort keys %samples ) { |
3066 | |
3067 | #next unless 'empty' eq $test; |
3068 | my %details = %{ $samples{$test} }; |
3069 | |
3070 | if ( my $skip_if = delete $details{skip_if} ) { |
3071 | next TEST if $skip_if->(); |
3072 | } |
3073 | |
3074 | my $results = delete $details{results}; |
3075 | my $args = delete $details{__ARGS__}; |
3076 | my $need_open3 = delete $details{need_open3}; |
3077 | |
3078 | next TEST if $need_open3 && ( $hide_fork || !$can_open3 ); |
3079 | |
3080 | # the following acrobatics are necessary to make it easy for the |
3081 | # Test::Builder::failure_output() method to be overridden when |
3082 | # TAP::Parser is not installed. Otherwise, these tests will fail. |
5e727a3e |
3083 | |
3084 | unshift @{ $args->{switches} }, |
3085 | $ENV{PERL_CORE} ? ( map {"-I$_"} @INC ) : ('-It/lib'); |
b965d173 |
3086 | |
3087 | $args->{source} = File::Spec->catfile( $SAMPLE_TESTS, $test ); |
3088 | $args->{merge} = !$hide_fork; |
3089 | |
3090 | my $parser = eval { analyze_test( $test, [@$results], $args ) }; |
3091 | my $error = $@; |
5e727a3e |
3092 | ok !$error, "'$test' should parse successfully" |
3093 | or diag $error; |
b965d173 |
3094 | |
3095 | if ($error) { |
3096 | my $tests = 0; |
3097 | while ( my ( $method, $answer ) = each %details ) { |
3098 | $tests += ref $answer ? 2 : 1; |
3099 | } |
3100 | SKIP: { |
3101 | skip "$test did not parse successfully", $tests; |
3102 | } |
3103 | } |
3104 | else { |
3105 | while ( my ( $method, $answer ) = each %details ) { |
3106 | if ( my $handler = $HANDLER_FOR{ $answer || '' } ) { # yuck |
3107 | ok $handler->( $parser->$method() ), |
3108 | "... and $method should return a reasonable value ($test)"; |
3109 | } |
3110 | elsif ( !ref $answer ) { |
3111 | local $^W; # uninit warnings |
3112 | |
3113 | $answer = _vmsify_answer( $method, $answer ); |
3114 | |
3115 | is $parser->$method(), $answer, |
3116 | "... and $method should equal $answer ($test)"; |
3117 | } |
3118 | else { |
3119 | is scalar $parser->$method(), scalar @$answer, |
3120 | "... and $method should be the correct amount ($test)"; |
3121 | is_deeply [ $parser->$method() ], $answer, |
3122 | "... and $method should be the correct values ($test)"; |
3123 | } |
3124 | } |
3125 | } |
3126 | } |
3127 | } |
3128 | |
5e727a3e |
3129 | my %Unix2VMS_Exit_Codes = ( 1 => 4, ); |
b965d173 |
3130 | |
3131 | sub _vmsify_answer { |
3132 | my ( $method, $answer ) = @_; |
3133 | |
3134 | return $answer unless $IsVMS; |
3135 | |
3136 | if ( $method eq 'exit' |
3137 | and exists $Unix2VMS_Exit_Codes{$answer} ) |
3138 | { |
3139 | $answer = $Unix2VMS_Exit_Codes{$answer}; |
3140 | } |
3141 | |
3142 | return $answer; |
3143 | } |
3144 | |
3145 | sub analyze_test { |
3146 | my ( $test, $results, $args ) = @_; |
3147 | |
3148 | my $parser = TAP::Parser->new($args); |
3149 | my $count = 1; |
3150 | while ( defined( my $result = $parser->next ) ) { |
3151 | |
3152 | my $expected = shift @$results; |
3153 | my $desc |
3154 | = $result->is_test |
3155 | ? $result->description |
3156 | : $result->raw; |
5e727a3e |
3157 | $desc = $result->plan |
3158 | if $result->is_plan && $desc =~ /SKIP/i; |
b965d173 |
3159 | $desc =~ s/#/<hash>/g; |
3160 | $desc =~ s/\s+/ /g; # Drop newlines |
3161 | ok defined $expected, |
3162 | "$test/$count We should have a result for $desc"; |
3163 | while ( my ( $method, $answer ) = each %$expected ) { |
3164 | |
3165 | if ( my $handler = $HANDLER_FOR{ $answer || '' } ) { # yuck |
3166 | ok $handler->( $result->$method() ), |
3167 | "... and $method should return a reasonable value ($test/$count)"; |
3168 | } |
3169 | elsif ( ref $answer ) { |
2a7f4b9b |
3170 | is_deeply scalar( $result->$method() ), $answer, |
b965d173 |
3171 | "... and $method should return the correct structure ($test/$count)"; |
3172 | } |
3173 | else { |
3174 | is $result->$method(), $answer, |
3175 | "... and $method should return the correct answer ($test/$count)"; |
3176 | } |
3177 | } |
3178 | $count++; |
3179 | } |
3180 | is @$results, 0, |
3181 | "... and we should have the correct number of results ($test)"; |
3182 | return $parser; |
3183 | } |
3184 | |
3185 | # vms_nit |