-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test2::API - harden T2_FORMATTER env access.
There were two problems. The first is accessing the %ENV hash when it might locked. Using Test2::Util::_env_get() solves that problem. The second issue is that the patterns might match "+" with no extra string, leaving the formatter as the empty string. The third problem is the defaulting for the formatter could end up not being triggered and the formatter being left as the empty string. This fixes all three issues. I noticed the second two when I fixing the first and did it wrong accidentally.
- Loading branch information
Showing
2 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters