Rename-Many Whole word for Copy pattern is not effective
Closed this issue · 1 comments
plastikfan commented
In the Rename-Many tests, this this test is passing in it's current form and should not be:
Context 'and: Whole Copy' {
It 'should: do rename; replace First Pattern for Copy text' {
$script:expected = @{
'loopz.application.t1.log' = 'loopz.t1pplication.t1.log';
'loopz.application.t2.log' = 'loopz.t2pplication.t2.log';
'loopz.data.t1.txt' = 'loopz.dt1ta.t1.txt';
'loopz.data.t2.txt' = 'loopz.dt2ta.t2.txt';
'loopz.data.t3.txt' = 'loopz.dt3ta.t3.txt';
}
Get-ChildItem -Path $directoryPath | Rename-Many -File `
-Pattern 'a', f -Copy 't\d' -Whole c -WhatIf;
}
} # and: Whole Copy
What this shows is that 'loopz.application.t1.log' is renamed to 'loopz.t1pplication.t1.log', but there is no whole word occurrence of 'a', so it should not be renamed. This also applies to all the other entries.
This particular test is valid, except for those expectations; the expectations in this example should be empty, signifiying no change expected.
plastikfan commented
This is an invalid issue, will not fix.