We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 673a69b commit ba8e7fbCopy full SHA for ba8e7fb
Update-PipeScript.tests.ps1
@@ -0,0 +1,20 @@
1
+describe Update-PipeScript {
2
+ context 'Updating ScriptBlocks' {
3
+ it 'Can rename a variable' {
4
+ Update-PipeScript -ScriptBlock { $v } -RenameVariable @{v='x'} |
5
+ Should -BeLike '*$x*'
6
+ }
7
8
+
9
+ context 'Updating text' {
10
+ it 'Can -InsertBefore' {
11
+ Update-PipeScript -ScriptBlock { "world" } -InsertBefore @{'world'= 'hello '} |
12
+ Should -BeLike '*"hello world"*'
13
14
15
+ it 'Can -InsertAfter' {
16
+ Update-PipeScript -ScriptBlock { "hello" } -InsertAfter @{"hello" = " world"} |
17
18
19
20
+}
0 commit comments