@@ -182,14 +182,15 @@ public void testGetShellCommandLineWindows() throws Exception {
182182 cmd .addArguments (new String [] {"a" , "b" });
183183 String [] shellCommandline = cmd .getShellCommandline ();
184184
185- assertEquals (4 , shellCommandline .length , "Command line size" );
185+ assertEquals (5 , shellCommandline .length , "Command line size" );
186186
187187 assertEquals ("cmd.exe" , shellCommandline [0 ]);
188188 assertEquals ("/X" , shellCommandline [1 ]);
189- assertEquals ("/C" , shellCommandline [2 ]);
189+ assertEquals ("/D" , shellCommandline [2 ]);
190+ assertEquals ("/C" , shellCommandline [3 ]);
190191 String expectedShellCmd = "\" c:" + File .separator + "Program Files" + File .separator + "xxx\" a b" ;
191192 expectedShellCmd = "\" " + expectedShellCmd + "\" " ;
192- assertEquals (expectedShellCmd , shellCommandline [3 ]);
193+ assertEquals (expectedShellCmd , shellCommandline [4 ]);
193194 }
194195
195196 /**
@@ -204,15 +205,16 @@ public void testGetShellCommandLineWindowsWithSeveralQuotes() throws Exception {
204205 cmd .addArguments (new String [] {"c:\\ Documents and Settings\\ whatever" , "b" });
205206 String [] shellCommandline = cmd .getShellCommandline ();
206207
207- assertEquals (4 , shellCommandline .length , "Command line size" );
208+ assertEquals (5 , shellCommandline .length , "Command line size" );
208209
209210 assertEquals ("cmd.exe" , shellCommandline [0 ]);
210211 assertEquals ("/X" , shellCommandline [1 ]);
211- assertEquals ("/C" , shellCommandline [2 ]);
212+ assertEquals ("/D" , shellCommandline [2 ]);
213+ assertEquals ("/C" , shellCommandline [3 ]);
212214 String expectedShellCmd = "\" c:" + File .separator + "Program Files" + File .separator
213215 + "xxx\" \" c:\\ Documents and Settings\\ whatever\" b" ;
214216 expectedShellCmd = "\" " + expectedShellCmd + "\" " ;
215- assertEquals (expectedShellCmd , shellCommandline [3 ]);
217+ assertEquals (expectedShellCmd , shellCommandline [4 ]);
216218 }
217219
218220 /**
0 commit comments