Open stof opened 6 days ago
I agree that this is confusing, but this is, AFAIK, how the official PHPT test runner has always worked. I mention PHPT here because assertStringMatchesFormat()
(re)uses the code for EXPECTF
handling in PHPT tests.
Well, doing a format-aware diffing is more complex. But if the logic is implemented, maybe the official PHPT test runner would also accept using it to provide better failure reporting.
When asserting a string matches a format fails, the failure produces a string diff between the string and the expected format. This is quite confusing because this diff will report differences for each placeholder in the expected format, even when the corresponding content in the string matched that placeholder (and the issue was elsewhere)