Skip to content

Consolidate the four --with-project test macros#2088

Merged
bbatsov merged 1 commit into
masterfrom
test/consolidate-with-project-macro
Jul 8, 2026
Merged

Consolidate the four --with-project test macros#2088
bbatsov merged 1 commit into
masterfrom
test/consolidate-with-project-macro

Conversation

@bbatsov

@bbatsov bbatsov commented Jul 8, 2026

Copy link
Copy Markdown
Owner

The follow-up to #2087. The replace, replace-review, scan-async and search-review suites each defined a near-identical --with-project macro (sandbox → create files → truename'd root → native indexing → fresh caches → stubbed project-root). Collapse them into a single projectile-test-with-project in the shared helpers.

Three suites call it directly. The replace suite keeps a thin macro that delegates to the shared one and layers on the search-upper-case / case-replace bindings its case-sensitivity specs depend on - so those specs keep their exact semantics (verified: "keeps case sensitivity", "re-scans when case sensitivity flips" et al. still pass).

Net ~80 fewer lines; no behavior change. 889 specs green, clean --warnings-as-errors, relint clean.

The replace, replace-review, scan-async and search-review suites each
carried a near-identical --with-project macro (sandbox, create files,
truename'd root, native indexing, fresh caches, stubbed project-root).
Replace them with a single projectile-test-with-project in the shared
helpers.

Three suites now call it directly; the replace suite keeps its own thin
macro that delegates to the shared one and adds the smart-case bindings
(search-upper-case / case-replace) its case-sensitivity specs rely on.

No behavior change; 889 specs green, including the case-sensitivity specs.
@bbatsov bbatsov merged commit 1c29f1b into master Jul 8, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant