Skip to content

Fix empty message crash. #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 7, 2025
Merged

Fix empty message crash. #162

merged 3 commits into from
May 7, 2025

Conversation

mbrandonw
Copy link
Member

@mbrandonw mbrandonw commented May 7, 2025

It appears that Swift Testing will crash when recording an issue with an empty comment:

Issue.record("")  // 🛑

I think we should work around this problem for reportIssue since they are typically used in app code and so has a great chance of a custom message being crafted that may end up as an empty string.

@mbrandonw mbrandonw requested a review from stephencelis May 7, 2025 15:26
@mbrandonw mbrandonw merged commit e5afd30 into main May 7, 2025
12 checks passed
@mbrandonw mbrandonw deleted the fix-empty-message branch May 7, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants