Merge contributor empty-foreach regression coverage into reviewed follow-ups

Preserve PR3213 author follow-up b07f690987.
No production changes. Exact four-line addition independently reviewed;
18 selected pure classifier checks pass on the combined source.
This commit is contained in:
affaan-m
2026-09-28 03:04:34 -04:00
@@ -485,6 +485,10 @@ test('distinguishes foreach statements from the pipeline alias', () => {
"foreach ($r in 'aaaaaaaaaaaaaa') { Remove-Item -Force C:/tmp/demo }",
[RULES.REMOVE_FORCE]
);
expectRules(
"foreach ($r in 'aaaaaaaaaaaaaa') {}; Remove-Item -Force C:/tmp/demo",
[RULES.REMOVE_FORCE]
);
expectRules('1 | foreach { Remove-Item -Force C:/tmp/demo }', [
RULES.REMOVE_FORCE,
]);