report: accept a report ID that ends with a newline

Plain-text replies usually end with one, and the ID check counted it as
part of the ID, so a report that was sent was said to have failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-08 11:36:43 -07:00
co-authored by Claude Opus 5.5
parent bd82063bbb
commit 1cd56f7a90
2 changed files with 10 additions and 0 deletions
+8
View File
@@ -147,3 +147,11 @@ field() {
[[ "$output" == *"Couldn't send the report"* ]]
[[ "$output" != *"Sent."* ]]
}
@test "a report ID ending with a newline, as replies usually do, is accepted" {
answers y
export CURL_REPLY='CD-7Q2K\n\n200'
run bash "$REPO/report" "$LOG"
[ "$status" -eq 0 ]
[[ "$output" == *"Your report's ID is CD-7Q2K;"* ]]
}