Repository navigation
test(script): the go-to-error tests name the cursor offset and remove their temp file even when an assert fails (#2938) - #2974
Conversation
… their temp file even when an assert fails (opengeos#2938)
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewI reviewed the two-file diff against Bugs
Security
Performance
Quality
AGENTS.md
Prior concerns
Change sizeCompared with the base branch (
|
… column comes from the script's line (opengeos#2938)
Code reviewPR #2974 is test-only: two files, no production code changed. I checked the new test logic against the helper signatures and the cursor and column arithmetic, and found no bugs or security issues. BugsNone found. I checked:
SecurityNone found. PerformanceNone found. Quality
AGENTS.mdNone found. The changes stay inside test code, the test-hygiene rules hold (no same-token Prior review threadsTwo earlier threads were raised, and both are resolved and outdated. Both were addressed in d8a5519 (the guard was moved above its comment, and Change sizeCompared with the base branch (merge base 77c573c to PR head d8a5519).
|
Code reviewI found no bugs, security issues, performance problems or AGENTS.md violations. I did not post any inline comments. I could not compile or run the tests here (no shell), so this review rests on reading the diff and the code around it. What I checked
Prior review threads: 3 left alone
Confidence: high that the change is correct as written. The one thing I could not confirm by reading is that the compiler and the clippy run pass, which CI will show. Change sizeCompared with the base branch (merge base 77c573c to PR head c0ab3b9), the whole PR.
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Summary
Closes #2938. Two follow-ups of #2820, in tests only (no code outside
#[cfg(test)]changes):a_stopped_run_marks_its_line_and_its_error_goes_there(crates/ui-egui/src/analysispane.rs) wrote the expected cursor three times as7 + 13 + 23. It is now one named value,error_at, built from the script's own parts: the characters of the two lines before the error (firstandsecond, each with its line break) plus its column minus one. The script is built from the samefirst,secondandcolumn, which the mark's assert uses too, so the three numbers can't drift apart.a_scripts_error_says_where_it_stopped(crates/engine/src/tests.rs) removed the file its streamed case writes after the assert, so a failing test left it behind. The issue proposed taking the result, removing the file and asserting after; butstopasserts inside (e.starts_with(starts)), before it returns, so that would still leave the file when that assert fails. The file is now held by a smallDropguard local to the test, which removes it however the test ends.Reaches: nothing a user sees (tests); the desktop, the browser, the command line, Python, MCP and plugins are not touched.
Not in this PR: the cases the issue doesn't name (
NOT_AHEAD, the non-native refusal andcheck_prepared_prefixare still not pinned by this test, as #2962 says).Testing
7 + 13 + 23= 43 ="# move\n"7 +"map.zoomFull\n"13 + column 24 minus 1).line 2:changed toline 9:the test fails and norustgis-engine-*-script-stopped-at.fgbstays in the temp directory; the change is not committed.checks.shonrustgis-engineandrustgis-ui-egui: fmt, clippy, nextest (9602 passed), doctests, layers, schema, all exit 0.git merge-treeagainst the seven open PRs that touchanalysispane.rsortests.rs(feat(layout): a layout's page takes a colour #2950, feat(raster): Mosaic Rasters on a thread of its own, with Cancel (#2907) #2936, Fix UI dialog, web picker, Python URL, saved-file format, and plugin loss bugs #2935, fix: harden path validation, auth transport checks, and credential scrubbing #2928, fix(geom,analysis,render): fix NaN/overflow panics, hole bridging, antimeridian profile, and cancel checks #2925, Harden engine scope, credential, format, and sharing guards #2924, fix(engine): overture.add from a plugin command in the app answers pending, not an empty list (#2677) #2905): no conflict.UI evidence
No visible UI change.
Related issue
Closes #2938.
Summary by CodeRabbit