-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Example
- Loading branch information
StartAutomating
authored and
StartAutomating
committed
Mar 9, 2024
1 parent
6737829
commit a3a74a3
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
Tests/Examples/Template.PipeScript.Inherit.examples.tests.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
describe 'Template.PipeScript.Inherit' { | ||
it 'Template.PipeScript.Inherit Example 1' { | ||
Invoke-PipeScript { | ||
[inherit("Get-Command")] | ||
param() | ||
} | ||
} | ||
it 'Template.PipeScript.Inherit Example 2' { | ||
{ | ||
[inherit("gh",Overload)] | ||
param() | ||
begin { "ABOUT TO CALL GH"} | ||
end { "JUST CALLED GH" } | ||
}.Transpile() | ||
} | ||
it 'Template.PipeScript.Inherit Example 3' { | ||
# Inherit Get-Transpiler abstractly and make it output the parameters passed in. | ||
{ | ||
[inherit("Get-Transpiler", Abstract)] | ||
param() process { $psBoundParameters } | ||
}.Transpile() | ||
} | ||
it 'Template.PipeScript.Inherit Example 4' { | ||
{ | ||
[inherit("Get-Transpiler", Dynamic, Abstract)] | ||
param() | ||
} | .>PipeScript | ||
} | ||
} | ||
|