Commit 46c6709
fix(test): make CwdDrift revert-hint assertion platform-agnostic
InvokeExpression_CwdDriftNotice_EscapesSingleQuotesInRevertHint asserted
the literal substring "Set-Location -LiteralPath ''C:" in the bail
response. That worked on Windows where Path.GetTempPath() returns a
C:\... path, but on Linux (/tmp/...) and macOS (/var/folders/...) the
"C:" prefix never appeared, so the test was failing in CI on both
non-Windows runners while staying green locally.
The intent of the assertion is to confirm the apostrophe-doubling
escape (' -> '') gets applied to the AI''s intended cwd before it
reaches the AI as part of a single-quoted PowerShell literal. Build
the expected substring from aiCwd itself (with the same Replace
applied) so the test exercises the escape contract on every platform
without baking in a path prefix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b76e9e2 commit 46c6709
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1189 | 1189 | | |
1190 | 1190 | | |
1191 | 1191 | | |
1192 | | - | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
1193 | 1198 | | |
1194 | | - | |
| 1199 | + | |
1195 | 1200 | | |
1196 | 1201 | | |
1197 | 1202 | | |
| |||
0 commit comments