Author: sgoeschl Date: Thu Apr 24 13:33:41 2008 New Revision: 651406 URL: http://svn.apache.org/viewvc?rev=651406&view=rev Log: Added new regression test to analyze a quoting problem reported by Tino Schoellhorn - to no avail.
Modified: commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java Modified: commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java URL: http://svn.apache.org/viewvc/commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java?rev=651406&r1=651405&r2=651406&view=diff ============================================================================== --- commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java (original) +++ commons/sandbox/exec/trunk/src/test/java/org/apache/commons/exec/CommandLineTest.java Thu Apr 24 13:33:41 2008 @@ -205,12 +205,18 @@ } } - public void _testParseComplexCommandLine1() throws Exception { + + /** + * A command line parsing puzzle from Tino Schoellhorn - ImageMagix expects + * a "500x>" parameter (including quotes) and it is simply not possible to + * do that withoud adding a space, e.g. "500x> ". + */ + public void testParseComplexCommandLine1() throws Exception { HashMap substitutionMap = new HashMap(); substitutionMap.put("in", "source.jpg"); substitutionMap.put("out", "target.jpg"); - CommandLine cmdl = CommandLine.parse("cmd /C convert ${in} -resize \"\'500x>\'\" ${out}", substitutionMap); - assertEquals("cmd /C convert source.jpg -resize \"500x>\" target.jpg", cmdl.toString()); + CommandLine cmdl = CommandLine.parse("cmd /C convert ${in} -resize \"\'500x> \'\" ${out}", substitutionMap); + assertEquals("cmd /C convert source.jpg -resize \"500x> \" target.jpg", cmdl.toString()); return; }