-
-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy path.test.ps1
More file actions
15 lines (13 loc) · 542 Bytes
/
.test.ps1
File metadata and controls
15 lines (13 loc) · 542 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
if ($env:GITHUB_ACTION) {return task GITHUB_ACTION}
$Version = $PSVersionTable.PSVersion.Major
task Version-must-be-first-parameter -If ($Version -le 5) {
($r = .\Version-must-be-first-parameter.ps1 | Out-String)
equals $global:LASTEXITCODE 1
assert ($r -like '-Version :*FullyQualifiedErrorId : CommandNotFoundException*')
}
# fixed in v6-beta.9
task v6-ignores-stuff-after-Version -If ($Version -ge 6) {
($r = .\v6-ignores-stuff-after-Version.ps1 | Out-String)
equals $global:LASTEXITCODE 0
assert ($r -cmatch 'PowerShell \d+\.')
}