Skip to content

🧪 Add tests for SetKey edge cases and fix regex bug#100

Open
Ven0m0 wants to merge 1 commit intomainfrom
jules-17628847229633971450-9c3cbf42
Open

🧪 Add tests for SetKey edge cases and fix regex bug#100
Ven0m0 wants to merge 1 commit intomainfrom
jules-17628847229633971450-9c3cbf42

Conversation

@Ven0m0
Copy link
Copy Markdown
Owner

@Ven0m0 Ven0m0 commented May 3, 2026

🎯 What: SetKey was 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, "$", "$$") before RegExReplace evaluates it. Test coverage increased and reliability is improved.


PR created automatically by Jules for task 17628847229633971450 started by @Ven0m0

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI review requested due to automatic review settings May 3, 2026 04:54
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 before RegExReplace applies a SetKey() 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.

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented May 3, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • Other/Citra_per_game_config/v2/CitraConfigHelpers.ahk - Fixed SetKey to escape literal $ using StrReplace(value, "$", "$$") before RegExReplace
  • Other/Citra_per_game_config/v2/CitraConfigHelpers_Test.ahk - Added 4 edge case tests

Reviewed by step-3.5-flash · 697,824 tokens

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