/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/powershell/Language/Classes/Scripting.Classes.RunPath.Tests.ps1
22 строки
667 B
Steve Lee
Update copyright notice to latest guidance (#12190)
24 мар 2020, 21:08
Не верифицирован
24 мар 2020, 21:08
b7cb335
Код
Авторство
О чём код?
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Describe "Script with a class definition run path" -Tags "CI" { $TestCases = @( @{ FileName = 'MyTest.ps1'; Name = 'path without a comma' } @{ FileName = 'My,Test.ps1'; Name = 'path with a comma' } ) It "Script with a class definition can run from a <Name>" -TestCases $TestCases { param( $FileName ) $FilePath = Join-Path -Path $TestDrive -ChildPath $FileName @' class MyClass { static [string]$MyProperty = 'Some value' } [MyClass]::MyProperty '@ | Out-File -FilePath $FilePath ( . $FilePath ) | Should -Match 'Some value' } }