🧪 Add tests for SetKey edge cases and fix regex bug#100
Conversation
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Pull request overview
This PR hardens the v2 Citra per-game config helper in Other/Citra_per_game_config/v2 by fixing SetKey() so literal dollar signs are preserved when updating existing INI-style keys via RegExReplace. It fits the codebase by improving the shared helper used by the Citra config automation scripts and extending the accompanying manual test script for edge cases that previously corrupted config values.
Changes:
- Escape literal
$characters beforeRegExReplaceapplies aSetKey()update. - Add
SetKey()tests for empty values, literal$, literal$1, and appending new keys containing$.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
Other/Citra_per_game_config/v2/CitraConfigHelpers.ahk |
Fixes SetKey() replacement handling so literal dollar signs are written back correctly. |
Other/Citra_per_game_config/v2/CitraConfigHelpers_Test.ahk |
Adds edge-case coverage for SetKey() behavior around empty values and literal dollar signs. |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by step-3.5-flash · 697,824 tokens |
🎯 What:
SetKeywas missing tests for various edge cases. Specifically, values containing literal$signs would be evaluated as regex backreferences, corrupting configs.📊 Coverage: Added tests for handling empty values, literal
$signs, literal$1, and appending new keys containing$.✨ Result: Discovered and patched a bug using
StrReplace(value, "$", "$$")beforeRegExReplaceevaluates it. Test coverage increased and reliability is improved.PR created automatically by Jules for task 17628847229633971450 started by @Ven0m0