Skip to content

Commit 1ba7118

Browse files
committed
Adding in out of scope $i to test case which shouldnt be renamed
1 parent a19671f commit 1ba7118

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

test/PowerShellEditorServices.Test.Shared/Refactoring/Variables/RefactorVariablesData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ internal static class RenameVariableData
160160
{
161161
FileName = "VariableInForloopDuplicateAssignment.ps1",
162162
Column = 14,
163-
Line = 7,
163+
Line = 8,
164164
RenameTo = "Renamed"
165165
};
166166
public static readonly RenameSymbolParams VariableInWhileDuplicateAssignment = new()

test/PowerShellEditorServices.Test.Shared/Refactoring/Variables/VariableInForloopDuplicateAssignment.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ $b = 6..10
33
function test {
44
process {
55

6+
$i=10
7+
68
for ($i = 0; $i -lt $a.Count; $i++) {
79
$i
810
}

test/PowerShellEditorServices.Test.Shared/Refactoring/Variables/VariableInForloopDuplicateAssignmentRenamed.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ $b = 6..10
33
function test {
44
process {
55

6+
$i=10
7+
68
for ($Renamed = 0; $Renamed -lt $a.Count; $Renamed++) {
79
$Renamed
810
}

0 commit comments

Comments
 (0)