Skip to content
Permalink
Browse files

[JENKINS-26684] Reproduce in unittest.

(cherry picked from commit fae41b0)
  • Loading branch information
olivergondza committed Mar 31, 2015
1 parent bf0f07a commit 62932bad922f94f7d273871051073d66254a1a51
Showing with 37 additions and 0 deletions.
  1. +37 −0 test/src/test/java/hudson/tasks/MavenTest.java
@@ -268,4 +268,41 @@ public void testNullHome() throws Exception {
assertEquals("{}", env.toString());
}

@Issue("JENKINS-26684")
@Test public void specialCharsInBuildVariablesPassedAsProperties() throws Exception {
j.configureDefaultMaven();

FreeStyleProject p = j.createFreeStyleProject();
p.getBuildersList().add(new Maven("--help", null));
p.addProperty(new ParametersDefinitionProperty(
new StringParameterDefinition("tilde", "~"),
new StringParameterDefinition("exclamation_mark", "!"),
new StringParameterDefinition("at_sign", "@"),
new StringParameterDefinition("sharp", "#"),
new StringParameterDefinition("dolar", "$"),
new StringParameterDefinition("percent", "%"),
new StringParameterDefinition("circumflex", "^"),
new StringParameterDefinition("ampersand", "&"),
new StringParameterDefinition("asterix", "*"),
new StringParameterDefinition("parentheses", "()"),
new StringParameterDefinition("underscore", "_"),
new StringParameterDefinition("plus", "+"),
new StringParameterDefinition("braces", "{}"),
new StringParameterDefinition("brackets", "[]"),
new StringParameterDefinition("colon", ":"),
new StringParameterDefinition("semicolon", ";"),
new StringParameterDefinition("quote", "\""),
new StringParameterDefinition("apostrophe", "'"),
new StringParameterDefinition("backslash", "\\"),
new StringParameterDefinition("pipe", "|"),
new StringParameterDefinition("angle_brackets", "<>"),
new StringParameterDefinition("comma", ","),
new StringParameterDefinition("period", "."),
new StringParameterDefinition("slash", "/"),
new StringParameterDefinition("question_mark", "?"),
new StringParameterDefinition("space", " ")
));

FreeStyleBuild build = j.buildAndAssertSuccess(p);
}
}

0 comments on commit 62932ba

Please sign in to comment.
You can’t perform that action at this time.