@@ -182,14 +182,15 @@ public void testGetShellCommandLineWindows() throws Exception {
182
182
cmd .addArguments (new String [] {"a" , "b" });
183
183
String [] shellCommandline = cmd .getShellCommandline ();
184
184
185
- assertEquals (4 , shellCommandline .length , "Command line size" );
185
+ assertEquals (5 , shellCommandline .length , "Command line size" );
186
186
187
187
assertEquals ("cmd.exe" , shellCommandline [0 ]);
188
188
assertEquals ("/X" , shellCommandline [1 ]);
189
- assertEquals ("/C" , shellCommandline [2 ]);
189
+ assertEquals ("/D" , shellCommandline [2 ]);
190
+ assertEquals ("/C" , shellCommandline [3 ]);
190
191
String expectedShellCmd = "\" c:" + File .separator + "Program Files" + File .separator + "xxx\" a b" ;
191
192
expectedShellCmd = "\" " + expectedShellCmd + "\" " ;
192
- assertEquals (expectedShellCmd , shellCommandline [3 ]);
193
+ assertEquals (expectedShellCmd , shellCommandline [4 ]);
193
194
}
194
195
195
196
/**
@@ -204,15 +205,16 @@ public void testGetShellCommandLineWindowsWithSeveralQuotes() throws Exception {
204
205
cmd .addArguments (new String [] {"c:\\ Documents and Settings\\ whatever" , "b" });
205
206
String [] shellCommandline = cmd .getShellCommandline ();
206
207
207
- assertEquals (4 , shellCommandline .length , "Command line size" );
208
+ assertEquals (5 , shellCommandline .length , "Command line size" );
208
209
209
210
assertEquals ("cmd.exe" , shellCommandline [0 ]);
210
211
assertEquals ("/X" , shellCommandline [1 ]);
211
- assertEquals ("/C" , shellCommandline [2 ]);
212
+ assertEquals ("/D" , shellCommandline [2 ]);
213
+ assertEquals ("/C" , shellCommandline [3 ]);
212
214
String expectedShellCmd = "\" c:" + File .separator + "Program Files" + File .separator
213
215
+ "xxx\" \" c:\\ Documents and Settings\\ whatever\" b" ;
214
216
expectedShellCmd = "\" " + expectedShellCmd + "\" " ;
215
- assertEquals (expectedShellCmd , shellCommandline [3 ]);
217
+ assertEquals (expectedShellCmd , shellCommandline [4 ]);
216
218
}
217
219
218
220
/**
0 commit comments