Skip to content

Use fixed-string matching in sudoku-solver tests#26

Merged
doctorlai-msrc merged 2 commits intosudokufrom
copilot/sub-pr-22-yet-again
Mar 23, 2026
Merged

Use fixed-string matching in sudoku-solver tests#26
doctorlai-msrc merged 2 commits intosudokufrom
copilot/sub-pr-22-yet-again

Conversation

Copy link
Contributor

Copilot AI commented Mar 23, 2026

grep -q treats the pattern as a regex, which can silently misfire on special characters. The expected solution string and "Found 1 solution(s)." (contains ( and )) should be matched literally.

Changes

  • sudoku-solver/tests.sh: Replace grep -q with grep -Fq on both assertion lines to enforce fixed-string matching
-if ! echo "$output" | grep -q "$expected"; then
+if ! echo "$output" | grep -Fq "$expected"; then
 
-if ! echo "$limited_output" | grep -q "Found 1 solution(s)."; then
+if ! echo "$limited_output" | grep -Fq "Found 1 solution(s)."; then

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Co-authored-by: doctorlai-msrc <92519564+doctorlai-msrc@users.noreply.github.com>
Agent-Logs-Url: https://github.com/DoctorLai/cpp-coding-exercise/sessions/046cfbae-a5b3-412f-ade9-bee8689aa4db
@doctorlai-msrc doctorlai-msrc marked this pull request as ready for review March 23, 2026 13:52
@doctorlai-msrc doctorlai-msrc merged commit 8d62338 into sudoku Mar 23, 2026
@doctorlai-msrc doctorlai-msrc deleted the copilot/sub-pr-22-yet-again branch March 23, 2026 13:52
Copilot AI restored the copilot/sub-pr-22-yet-again branch March 23, 2026 13:52
Copilot AI changed the title [WIP] [WIP] Address feedback from review on Sudoku implementation Use fixed-string matching in sudoku-solver tests Mar 23, 2026
Copilot AI requested a review from doctorlai-msrc March 23, 2026 13:53
Copilot stopped work on behalf of doctorlai-msrc due to an error March 23, 2026 13:53
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