Skip to content
Permalink
Browse files
[FIXED JENKINS-18543] Revert break from commit 1152504
  • Loading branch information
jzimmerman authored and jzimmerman committed Jul 19, 2013
1 parent 6bd0088 commit ed6d6d97884a395b7c149d0a773eab6bc76af753
Showing with 6 additions and 6 deletions.
  1. +1 −2 src/main/java/hudson/plugins/msbuild/MsBuildBuilder.java
  2. +5 −4 src/test/java/hudson/plugins/msbuild/MsBuildBuilderTest.java
@@ -185,8 +185,7 @@ public Descriptor<Builder> getDescriptor() {
* @return
*/
static String[] tokenizeArgs(String args) {
QuotedStringTokenizer tokenizer = new QuotedStringTokenizer(args, " \t\n\r\f", false, true);
return tokenizer.toArray();
return Util.tokenize(args);
}

@Extension
@@ -10,13 +10,14 @@
public class MsBuildBuilderTest {

@Test
public void shouldRetainQuotedArguments() {
final String platform = "/p:Platform=\"Any CPU\"";
public void shouldStripQuotedArguments() {
final String quotedPlatform = "/p:Platform=\"Any CPU\"";
final String strippedPlatform = "/p:Platform=Any CPU";

String[] tokenizedArgs = MsBuildBuilder.tokenizeArgs(platform);
String[] tokenizedArgs = MsBuildBuilder.tokenizeArgs(quotedPlatform);
assertNotNull(tokenizedArgs);
assertEquals(1, tokenizedArgs.length);
assertEquals(platform, tokenizedArgs[0]);
assertEquals(strippedPlatform, tokenizedArgs[0]);
}

@Test

0 comments on commit ed6d6d9

Please sign in to comment.