Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #84 from DealerDotCom/master
[FIXED JENKINS-38551] Escape invalid chars in gdsl generation
- Loading branch information
Showing
4 changed files
with
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ target | |
work | ||
node | ||
node_modules | ||
.idea/ | ||
*.iml |
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
41 changes: 41 additions & 0 deletions
41
...test/java/org/jenkinsci/plugins/workflow/testMetaStep/DisplaynameWithEscapeCharState.java
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,41 @@ | ||
package org.jenkinsci.plugins.workflow.testMetaStep; | ||
|
||
import com.google.inject.Inject; | ||
import hudson.Extension; | ||
import hudson.model.TaskListener; | ||
import org.jenkinsci.plugins.workflow.steps.AbstractStepDescriptorImpl; | ||
import org.jenkinsci.plugins.workflow.steps.AbstractStepImpl; | ||
import org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution; | ||
import org.jenkinsci.plugins.workflow.steps.StepContextParameter; | ||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
/** | ||
* Test class to make sure step descriptions with special characters are escaped properly. | ||
*/ | ||
public class DisplaynameWithEscapeCharState extends AbstractStepImpl { | ||
|
||
@DataBoundConstructor | ||
public DisplaynameWithEscapeCharState() {} | ||
|
||
private static final class Execution extends AbstractSynchronousNonBlockingStepExecution<Void> { | ||
@Override protected Void run() throws Exception { | ||
return null; | ||
} | ||
private static final long serialVersionUID = 1L; | ||
} | ||
|
||
@Extension | ||
public static final class DescriptorImpl extends AbstractStepDescriptorImpl { | ||
public DescriptorImpl() { | ||
super(Execution.class); | ||
} | ||
|
||
@Override public String getFunctionName() { | ||
return "displaynameWithEscapeCharState"; | ||
} | ||
|
||
@Override public String getDisplayName() { | ||
return "Testing 'escape characters' are added when needed."; | ||
} | ||
} | ||
} |