From 662302ec83174762bec5a0fb80f49501d1d9f783 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 11 Nov 2023 20:54:41 +0000 Subject: [PATCH] feat: Porting Bash Template to Language Function (Fixes #589) --- .../Examples/Language-Rust.examples.tests.ps1 | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) 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'} } }