From 2b6a9344943936fe44069c957735c3712388c7a9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Mar 2026 13:51:22 +0000 Subject: [PATCH 1/2] Initial plan From 01d9df125791231c4444cf82ed37ca783491d62f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Mar 2026 13:52:23 +0000 Subject: [PATCH 2/2] Use grep -Fq for fixed-string matching in tests.sh 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 --- sudoku-solver/tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sudoku-solver/tests.sh b/sudoku-solver/tests.sh index 6d7537c..fefa6e9 100755 --- a/sudoku-solver/tests.sh +++ b/sudoku-solver/tests.sh @@ -6,7 +6,7 @@ puzzle="53..7....6..195....98....6.8...6...34..8.3..17...2...6.6....28....419..5 expected="534678912672195348198342567859761423426853791713924856961537284287419635345286179" output=$(./sudoku-solver "$puzzle") -if ! echo "$output" | grep -q "$expected"; then +if ! echo "$output" | grep -Fq "$expected"; then echo "Test failed: expected solution was not found" exit 1 fi @@ -18,7 +18,7 @@ if ./sudoku-solver "$invalid" >/dev/null 2>&1; then fi limited_output=$(./sudoku-solver "$puzzle" 1) -if ! echo "$limited_output" | grep -q "Found 1 solution(s)."; then +if ! echo "$limited_output" | grep -Fq "Found 1 solution(s)."; then echo "Test failed: max_solutions limit did not work" exit 1 fi