forked from actions/runner
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
azp: Fail on invalid elseif/else sequence (#269)
* azp: Fail on invalid elseif/else sequence * fix unclear error msg * throw else after else
- Loading branch information
1 parent
e3e3265
commit 9aed8e1
Showing
5 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# ExpectedException: TemplateValidationException | ||
# ExpectedErrorMessage: else | ||
steps: | ||
- ${{ if true }}: | ||
- ${{ if false }}: | ||
- ${{ else }}: | ||
- ${{ else }}: | ||
- ${{ else }}: | ||
- script: noop |
8 changes: 8 additions & 0 deletions
8
testworkflows/azpipelines/else-with-colon-exec-error/pipeline.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# ExpectedException: TemplateValidationException | ||
# ExpectedErrorMessage: else | ||
steps: | ||
- ${{ if true }}: | ||
# This else token is an error if not skipped by if | ||
- ${{ else }}: | ||
- ${{ else }}: | ||
- script: noop |
6 changes: 6 additions & 0 deletions
6
testworkflows/azpipelines/else-with-colon-no-error/pipeline.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
steps: | ||
- ${{ if false }}: | ||
# This else token is not an error if skipped by if | ||
- ${{ else }}: | ||
- ${{ else }}: | ||
- script: noop |
7 changes: 7 additions & 0 deletions
7
testworkflows/azpipelines/else-without-colon-error/pipeline.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# ExpectedException: TemplateValidationException | ||
# ExpectedErrorMessage: else | ||
steps: | ||
- ${{ if false }}: | ||
- ${{ else }} | ||
- ${{ else }}: | ||
- script: noop |