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