marcbradshaw / mail-bimi

Perl module implementing Brand Indicators for Message Identification (BIMI)
7 stars 1 forks source link

t/05-cmd.t fails (with new MooseX::Getopt?) #5

Open eserte opened 3 years ago

eserte commented 3 years ago

The test suite started to fail:

Name "Mail::BIMI::TestSuite::Resolver" used only once: possible typo at t/05-cmd.t line 21.

        #   Failed test 'No Exceptions as expected'
        #   at t/05-cmd.t line 193.
        # +---+------------------------------------------------------------+---+------------------------------------------------------------+
        # | Ln|Got                                                         | Ln|Expected                                                    |
        # +---+------------------------------------------------------------+---+------------------------------------------------------------+
        # |  1|'Error: No Domain specified                                 |  1|'Error: No Domain specified                                 |
        # |  2|Usage: 05-cmd.t <command> [-?h] [long options...]           |  2|Usage: 05-cmd.t <command> [-?h] [long options...]           |
        # *  3|        --help (or -h)  show help                           *  3|        -? -h --help  show help                             *
        # *  4|                        aka -?                              *   |                                                            |
        # |  5|                                                            |  4|                                                            |
        # |  6|05-cmd.t checkdomain [long options...] <DOMAIN>             |  5|05-cmd.t checkdomain [long options...] <DOMAIN>             |
        # |  7|        --profile STR   SVG Profile to validate against     |  6|        --profile STR   SVG Profile to validate against     |
        # |  8|                        (SVG_1.2_BIMI|SVG_1.2_PS|Tiny-1.2)  |  7|                        (SVG_1.2_BIMI|SVG_1.2_PS|Tiny-1.2)  |
        # |  9|        --selector STR  Optional selector                   |  8|        --selector STR  Optional selector                   |
        # | 10|'                                                           |  9|'                                                           |
        # +---+------------------------------------------------------------+---+------------------------------------------------------------+
        # Looks like you failed 1 test of 3.

... etc ...

        #   Failed test 'No Exceptions as expected'
        #   at t/05-cmd.t line 193.
        # +---+------------------------------------------------------------+---+------------------------------------------------------------+
        # | Ln|Got                                                         | Ln|Expected                                                    |
        # +---+------------------------------------------------------------+---+------------------------------------------------------------+
        # |  1|'Error: Multiple URIs specified                             |  1|'Error: Multiple URIs specified                             |
        # |  2|Usage: 05-cmd.t <command> [-?h] [long options...]           |  2|Usage: 05-cmd.t <command> [-?h] [long options...]           |
        # *  3|        --help (or -h)  show help                           *  3|        -? -h --help  show help                             *
        # *  4|                        aka -?                              *   |                                                            |
        # |  5|                                                            |  4|                                                            |
        # |  6|05-cmd.t checksvg [long options...] <URI>                   |  5|05-cmd.t checksvg [long options...] <URI>                   |
        # |  7|        --profile STR  SVG Profile to validate against      |  6|        --profile STR  SVG Profile to validate against      |
        # |  8|                       (SVG_1.2_BIMI|SVG_1.2_PS|Tiny-1.2)   |  7|                       (SVG_1.2_BIMI|SVG_1.2_PS|Tiny-1.2)   |
        # |  9|        --fromfile     Fetch from file instead of from URI  |  8|        --fromfile     Fetch from file instead of from URI  |
        # | 10|'                                                           |  9|'                                                           |
        # +---+------------------------------------------------------------+---+------------------------------------------------------------+
        # Looks like you failed 1 test of 3.

    #   Failed test 'Multiple URIs'
    #   at t/05-cmd.t line 174.
    # Looks like you failed 3 tests of 7.

#   Failed test 'checksvg'
#   at t/05-cmd.t line 176.
# Looks like you failed 3 tests of 3.
t/05-cmd.t ........................ 
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/3 subtests 

I saw similar failures in other CPAN distribution which were caused by newer MooseX::Getopt versions, so maybe this is the cause here, too.

marcbradshaw commented 3 years ago

Almost certainly due to MooseX::Getopt, I will make the test less dependent on the exact output. Thanks.

eserte commented 3 weeks ago

Still the test fails:

Name "Mail::BIMI::TestSuite::Resolver" used only once: possible typo at t/05-cmd.t line 25.
t/05-cmd.t ........................ 
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run 

I see that there is a skip depending on AUTHOR_TESTS environment variable. However, this is done during runtime, while the fatal warnings check is done during compile time.

eserte commented 3 weeks ago

This does not happen on all system. I see it with perl 5.40.0, so maybe a change how "use warnings FATAL" works in newer perls?