Skip to content

Correctly report the calling location in test functions

Maxime Besson requested to merge fix-test-call-stack into v2.0

With this change, failure in a test lib function (expectForm, expectJWT...) will be reported at the calling location in the original *.t test file, instead of being reported in the test lib

Before:

t/30-SAML-ReAuth-with-choice.t .. 1/? 
#   Failed test ' URI match'
#   at t/test-lib.pm line 332.

After:

t/30-SAML-ReAuth-with-choice.t .. 1/?
#   Failed test ' URI match'
#   at t/30-SAML-ReAuth-with-choice.t line 72.

Merge request reports