diff --git a/Tests/Examples/Language-Rust.examples.tests.ps1 b/Tests/Examples/Language-Rust.examples.tests.ps1 index 9ea87d899..54b6bcb91 100644 --- a/Tests/Examples/Language-Rust.examples.tests.ps1 +++ b/Tests/Examples/Language-Rust.examples.tests.ps1 @@ -23,16 +23,7 @@ describe 'Language-Rust' { ' $HelloWorldRust.Evaluate('hi') - $HelloWorldRust.Save(@{Message='Hello'}) | - Foreach-Object { - $file = $_ - if (Get-Command rustc -commandType Application) { - $null = rustc $file.FullName - & ".\$($file.Name.Replace($file.Extension, '.exe'))" - } else { - Write-Error "Go install Rust" - } - } + $HelloWorldRust.Save(@{Message='Hello'}) } } it 'Language-Rust Example 3' { @@ -52,16 +43,7 @@ describe 'Language-Rust' { println!(`"{}`",msg); } " | Set-Content .\HelloWorld_Rust.ps1.rs - Invoke-PipeScript .\HelloWorld_Rust.ps1.rs -Parameter @{message='hi'} | - Foreach-Object { - $file = $_ - if (Get-Command rustc -commandType Application) { - $null = rustc $file.FullName - & ".\$($file.Name.Replace($file.Extension, '.exe'))" - } else { - Write-Error "Go install Rust" - } - } + Invoke-PipeScript .\HelloWorld_Rust.ps1.rs -Parameter @{message='hi'} } }