Skip to content
Permalink
Browse files
Merge pull request #8 from tyrius02/master
[FIXED JENKINS-18543] Revert break from commit 1152504...
  • Loading branch information
gboissinot committed Jul 27, 2013
2 parents 6bd0088 + ed6d6d9 commit 07f777ed18603bc8e66c3eb0e3c9523c1a9ed784
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 07f777e

Please sign in to comment.