Skip to content

t/proxy-with-stack-trace.t tests fail on Windows due to path separator #107

@shawnlaffan

Description

@shawnlaffan

Tested with Strawberry Perl 5.38.2.2.

One option is to change test regexp to allow for the windows path separator.

(?^:^Help! at t[/\\]proxy-with-stack-trace\.t

Alternately the path separator could be normalised to a forward slash before comparison. s{\\}{/}

Test errors:

t/proxy-with-stack-trace.t .. 1/241
#   Failed test 'default log with Moose::Exception message - message stringifies correctly'
#   at t/proxy-with-stack-trace.t line 358.
#                   'Help! at t\proxy-with-stack-trace.t line 122
#       main::bar('quux') called at t\proxy-with-stack-trace.t line 136
#       main::foo('bar', 'baz') called at t\proxy-with-stack-trace.t line 140
# '
#     doesn't match '(?^:^Help! at t/proxy-with-stack-trace\.t line \d+\n)'

#   Failed test 'proxy log with Moose::Exception message - message stringifies correctly'
#   at t/proxy-with-stack-trace.t line 358.
#                   'Help! at t\proxy-with-stack-trace.t line 122
#       main::bar at t\proxy-with-stack-trace.t line 136
#       main::foo at t\proxy-with-stack-trace.t line 140
# '
#     doesn't match '(?^:^Help! at t/proxy-with-stack-trace\.t line \d+\n)'

#   Failed test 'proxy log show args with Moose::Exception message - message stringifies correctly'
#   at t/proxy-with-stack-trace.t line 358.
#                   'Help! at t\proxy-with-stack-trace.t line 122
#       main::bar('quux') called at t\proxy-with-stack-trace.t line 136
#       main::foo('bar', 'baz') called at t\proxy-with-stack-trace.t line 140
# '
#     doesn't match '(?^:^Help! at t/proxy-with-stack-trace\.t line \d+\n)'

#   Failed test 'default log with Throwable::Error message - message stringifies correctly'
#   at t/proxy-with-stack-trace.t line 358.
#                   'Help!
#
# Trace begun at t\proxy-with-stack-trace.t line 128
# eval {...} at t\proxy-with-stack-trace.t line 128
# main::bar('quux') called at t\proxy-with-stack-trace.t line 136
# main::foo('bar', 'baz') called at t\proxy-with-stack-trace.t line 140
# '
#     doesn't match '(?^:^Help!\n\nTrace begun at t/proxy-with-stack-trace\.t line \d+\n)'

#   Failed test 'proxy log with Throwable::Error message - message stringifies correctly'
#   at t/proxy-with-stack-trace.t line 358.
#                   'Help!
#
# Trace begun at t\proxy-with-stack-trace.t line 128
# eval {...} at t\proxy-with-stack-trace.t line 128
# main::bar at t\proxy-with-stack-trace.t line 136
# main::foo at t\proxy-with-stack-trace.t line 140
# '
#     doesn't match '(?^:^Help!\n\nTrace begun at t/proxy-with-stack-trace\.t line \d+\n)'

#   Failed test 'proxy log show args with Throwable::Error message - message stringifies correctly'
#   at t/proxy-with-stack-trace.t line 358.
#                   'Help!
#
# Trace begun at t\proxy-with-stack-trace.t line 128
# eval {...} at t\proxy-with-stack-trace.t line 128
# main::bar('quux') called at t\proxy-with-stack-trace.t line 136
# main::foo('bar', 'baz') called at t\proxy-with-stack-trace.t line 140
# '
#     doesn't match '(?^:^Help!\n\nTrace begun at t/proxy-with-stack-trace\.t line \d+\n)'
# Looks like you failed 6 tests of 241.
t/proxy-with-stack-trace.t .. Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/241 subtests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions