Skip to content

Instantly share code, notes, and snippets.

@bentaylorwork
Created April 5, 2018 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bentaylorwork/cae6848d16676c472c4d96f0aed479c4 to your computer and use it in GitHub Desktop.
Save bentaylorwork/cae6848d16676c472c4d96f0aed479c4 to your computer and use it in GitHub Desktop.
$vstsTasks = @(
"##vso[task.setvariable variable=foo]bar"
"##vso[task.setvariable variable=for ]bar"
"##vso[task.setvariable variable=for] bar"
"##vso[ task.setvariable variable=for]bar"
"##vso [task.setvariable variable=for]bar"
)
Describe "VSTS" {
Context "Fake Lint" {
foreach($vstsTask in $vstsTasks) {
It "Variable Correct ']'" {
($vstsTask -match "(]\s)|(\s])|(\[\s)|(\s\[)") | Should -be $false
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment