From a05fffd9dce1974be8db7c912745bbc480cb42b6 Mon Sep 17 00:00:00 2001 From: Sergei Vorobev Date: Mon, 10 Oct 2016 15:21:56 -0700 Subject: [PATCH] Add a minishell clixml tests --- .../NativeExecution/NativeMinishell.Tests.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/powershell/Language/Scripting/NativeExecution/NativeMinishell.Tests.ps1 diff --git a/test/powershell/Language/Scripting/NativeExecution/NativeMinishell.Tests.ps1 b/test/powershell/Language/Scripting/NativeExecution/NativeMinishell.Tests.ps1 new file mode 100644 index 0000000000..44db92b6ee --- /dev/null +++ b/test/powershell/Language/Scripting/NativeExecution/NativeMinishell.Tests.ps1 @@ -0,0 +1,18 @@ +# Minishell is a powershell concept. +# It's primare use-case is when somebody executes a scriptblock in the new powershell process. +# The objects are automatically marshelled back to the parent session, so users can avoid custom +# serialization to pass objects between two processes. + +Describe 'minishell for native executables' -Tag 'CI' { + + BeforeAll { + $powershell = Join-Path -Path $PsHome -ChildPath "powershell" + } + + It 'gets a hashtable object from minishell' { + $output = & powershell { @{'a' = 'b'} } + ($output | measure).Count | Should Be 1 + ($output.GetType().Name) | Should Be 'Hashtable' + $output['a'] | Should Be 'b' + } +}