Skip to content
Permalink
Browse files

[JENKINS-26684] Reproduce in unittest.

  • Loading branch information
olivergondza committed Feb 8, 2015
1 parent 27dbc6b commit fae41b01c9c034ab98216c92ca6bd171b8d81d6b
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);
}
}

2 comments on commit fae41b0

@daniel-beck

This comment has been minimized.

Copy link
Member

@daniel-beck daniel-beck replied Mar 2, 2015

This test fails if you don't have a Maven on your PATH.

@olivergondza

This comment has been minimized.

Copy link
Member Author

@olivergondza olivergondza replied Mar 2, 2015

Good point: a87a5a1.

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