[lang-ref] ( get_source_file_path_when_called_from_another_script ) ( powershell )

It 'should get source file path when called from another script' {
    # Get-Command .. ScriptBlock.File

    $output = powershell -ExecutionPolicy Bypass -NoProfile -File .\example\GetSourceFilePathCall.ps1

    $output.Trim() | Should -Be (Join-Path (Get-Location) 'example\GetSourceFilePath.ps1')
}