|
116 | 116 |
|
117 | 117 | (defn- edit-with-decoy-and-verify+ |
118 | 118 | "Activate decoy editor, perform edit, verify active editor unchanged and file not visible." |
119 | | - [socket file-path tool-call-fn prev-content] |
| 119 | + [_socket _file-path tool-call-fn prev-content] |
120 | 120 | (p/let [_ (activate-decoy-editor+) |
121 | 121 | active-before (active-editor-path) |
122 | 122 | result (tool-call-fn) |
|
142 | 142 | "Edit should not leave more than 1 consecutive blank line")) |
143 | 143 |
|
144 | 144 | (defn- test-replace-trims-whitespace+ [socket file-path] |
145 | | - (p/let [{:keys [result content] :as ctx} |
| 145 | + (p/let [ctx |
146 | 146 | (edit-with-decoy-and-verify+ |
147 | 147 | socket file-path |
148 | 148 | #(mcp/call-tool socket 101 "clojure_edit_files" |
|
173 | 173 |
|
174 | 174 | (defn- test-insert-proper-spacing+ [socket file-path] |
175 | 175 | (p/let [content-before (read-test-file+ nil) |
176 | | - {:keys [result content] :as ctx} |
| 176 | + {:keys [_result content] :as ctx} |
177 | 177 | (edit-with-decoy-and-verify+ |
178 | 178 | socket file-path |
179 | 179 | #(mcp/call-tool socket 103 "clojure_edit_files" |
|
252 | 252 |
|
253 | 253 | (defn- test-delete-first-form+ [socket file-path] |
254 | 254 | (delete-and-verify-gone+ socket file-path |
255 | | - {:id 106 :line 3 :target-text "(defn multiply-numbers" |
256 | | - :form-name "(defn multiply-numbers" |
257 | | - :test-label "delete first form keeps spacing stable"})) |
| 255 | + {:id 106 :line 3 :target-text "(defn multiply-numbers" |
| 256 | + :form-name "(defn multiply-numbers" |
| 257 | + :test-label "delete first form keeps spacing stable"})) |
258 | 258 |
|
259 | 259 | (defn- test-delete-last-form+ [socket file-path] |
260 | 260 | (delete-and-verify-gone+ socket file-path |
261 | | - {:id 107 :line 8 :target-text "(defn divide-numbers" |
262 | | - :form-name "(defn divide-numbers" |
263 | | - :test-label "delete last form keeps spacing stable"})) |
| 261 | + {:id 107 :line 8 :target-text "(defn divide-numbers" |
| 262 | + :form-name "(defn divide-numbers" |
| 263 | + :test-label "delete last form keeps spacing stable"})) |
264 | 264 |
|
265 | 265 | (defn- test-wrong-target-text+ [socket file-path] |
266 | 266 | (p/let [result (mcp/call-tool socket 108 "clojure_edit_files" |
|
340 | 340 |
|
341 | 341 | (defn- test-continue-on-runtime-failure+ [socket] |
342 | 342 | (test-continue-on-failure+ socket |
343 | | - {:test-label "batch continues past runtime failure" |
344 | | - :id-create 120 :id-batch 121 |
345 | | - :valid-edit {:type "replace" :filePath (continue-file-path) |
346 | | - :line 3 :targetLineText "(defn add-numbers" |
347 | | - :newForm "(defn add-numbers\n \"Adds two numbers\"\n [a b]\n (+ a b))"} |
348 | | - :invalid-edit {:type "replace" :filePath (continue-file-path) |
349 | | - :line 8 :targetLineText "(defn nonexistent-function" |
350 | | - :newForm "(defn replaced [] :replaced)"} |
351 | | - :expected-content "Adds two numbers" |
352 | | - :expected-error "Target line text not found"})) |
| 343 | + {:test-label "batch continues past runtime failure" |
| 344 | + :id-create 120 :id-batch 121 |
| 345 | + :valid-edit {:type "replace" :filePath (continue-file-path) |
| 346 | + :line 3 :targetLineText "(defn add-numbers" |
| 347 | + :newForm "(defn add-numbers\n \"Adds two numbers\"\n [a b]\n (+ a b))"} |
| 348 | + :invalid-edit {:type "replace" :filePath (continue-file-path) |
| 349 | + :line 8 :targetLineText "(defn nonexistent-function" |
| 350 | + :newForm "(defn replaced [] :replaced)"} |
| 351 | + :expected-content "Adds two numbers" |
| 352 | + :expected-error "Target line text not found"})) |
353 | 353 |
|
354 | 354 | (defn- test-continue-on-edit-validation-failure+ [socket] |
355 | 355 | (test-continue-on-failure+ socket |
356 | | - {:test-label "batch continues past edit-level validation failure" |
357 | | - :id-create 122 :id-batch 123 |
358 | | - :valid-edit {:type "replace" :filePath (continue-file-path) |
359 | | - :line 3 :targetLineText "(defn add-numbers" |
360 | | - :newForm "(defn add-numbers\n \"Modified\"\n [a b]\n (+ a b))"} |
361 | | - :invalid-edit {:type "replace" :filePath (continue-file-path) |
362 | | - :line 8 :targetLineText "; this is a comment" |
363 | | - :newForm "(defn replaced [] :replaced)"} |
364 | | - :expected-content "\"Modified\"" |
365 | | - :expected-error "comment"})) |
| 356 | + {:test-label "batch continues past edit-level validation failure" |
| 357 | + :id-create 122 :id-batch 123 |
| 358 | + :valid-edit {:type "replace" :filePath (continue-file-path) |
| 359 | + :line 3 :targetLineText "(defn add-numbers" |
| 360 | + :newForm "(defn add-numbers\n \"Modified\"\n [a b]\n (+ a b))"} |
| 361 | + :invalid-edit {:type "replace" :filePath (continue-file-path) |
| 362 | + :line 8 :targetLineText "; this is a comment" |
| 363 | + :newForm "(defn replaced [] :replaced)"} |
| 364 | + :expected-content "\"Modified\"" |
| 365 | + :expected-error "comment"})) |
366 | 366 |
|
367 | 367 | ;; --- Test orchestrator --- |
368 | 368 |
|
|
0 commit comments