-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for proper escaping in java/scala/os names
- Loading branch information
Showing
2 changed files
with
74 additions
and
5 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 |
---|---|---|
|
@@ -370,6 +370,70 @@ class GenerativePluginSpec extends Specification { | |
- name: Checkout current branch (fast) | ||
uses: actions/checkout@v2""" | ||
} | ||
|
||
"compile a job with illegal characters in the JVM" in { | ||
val results = compileJob( | ||
WorkflowJob( | ||
"bippy", | ||
"Bippity Bop Around the Clock", | ||
List( | ||
WorkflowStep.Run(List("echo hello")), | ||
WorkflowStep.Checkout), | ||
javas = List("this:is>#illegal")), | ||
"") | ||
|
||
results mustEqual s"""bippy: | ||
name: Bippity Bop Around the Clock | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [2.13.1] | ||
java: ['this:is>#illegal'] | ||
runs-on: $${{ matrix.os }} | ||
steps: | ||
- run: echo hello | ||
|
||
- name: Checkout current branch (fast) | ||
uses: actions/checkout@v2""" | ||
} | ||
|
||
"compile a job with a long list of scala versions" in { | ||
val results = compileJob( | ||
WorkflowJob( | ||
"bippy", | ||
"Bippity Bop Around the Clock", | ||
List( | ||
WorkflowStep.Run(List("echo hello")), | ||
WorkflowStep.Checkout), | ||
scalas = List("this", "is", "a", "lot", "of", "versions", "meant", "to", "overflow", "the", "bounds", "checking")), | ||
"") | ||
|
||
results mustEqual s"""bippy: | ||
name: Bippity Bop Around the Clock | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: | ||
- this | ||
- is | ||
- a | ||
- lot | ||
- of | ||
- versions | ||
- meant | ||
- to | ||
- overflow | ||
- the | ||
- bounds | ||
- checking | ||
java: [[email protected]] | ||
runs-on: $${{ matrix.os }} | ||
steps: | ||
- run: echo hello | ||
|
||
- name: Checkout current branch (fast) | ||
uses: actions/checkout@v2""" | ||
} | ||
} | ||
|
||
"predicate compilation" >> { | ||
|