rollbear / trompeloeil

Header only C++14 mocking framework
Boost Software License 1.0
802 stars 85 forks source link

On seq mismatch, report first in line and first required #297

Closed rollbear closed 1 year ago

rollbear commented 1 year ago

@AndrewPaxie can you have a look and see if you understand why the regular expressions for sequence matching fail on the Windows builds? I assume it has something to do with line breaks, but I don't understand how. I've tried with explicit '\n' and the current shape with line breaks in the literal string source, hoping it'd become "\r\n".

codecov[bot] commented 1 year ago

Codecov Report

Merging #297 (4af80a4) into main (19e9e27) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #297      +/-   ##
==========================================
+ Coverage   97.97%   97.99%   +0.02%     
==========================================
  Files           1        1              
  Lines        1331     1345      +14     
==========================================
+ Hits         1304     1318      +14     
  Misses         27       27              
Impacted Files Coverage Δ
include/trompeloeil.hpp 97.99% <100.00%> (+0.02%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

AndrewPaxie commented 1 year ago

Yes, I'll have a look in the next day or so.

rollbear commented 1 year ago

I found a work-around, so no need, although you're of course still welcome to have a look.

I don't quite understand what's happening. A regex "a\nb" does not match. "a\r?\nb" does not either, which is really weird. "a.*\nb" does match, which is weirder still. Normally I would be very concerned by this, but since this is not the important bit I want to check for, I'm leaving it.