293 checkArgumentParsing("X\\Y\\Z", "X\\Y\\Z"); 294 checkArgumentParsing("\\X\\Y\\Z", "\\X\\Y\\Z"); 295 296 // literals within dangling quotes, etc. 297 checkArgumentParsing("\"a b c\" d e", "a b c", "d", "e"); 298 checkArgumentParsing("\"ab\\\"c\" \"\\\\\" d", "ab\"c", "\\", "d"); 299 checkArgumentParsing("a\\\\\\c d\"e f\"g h", "a\\\\\\c", "de fg", "h"); 300 checkArgumentParsing("a\\\\\\\"b c d", "a\\\"b", "c", "d"); 301 checkArgumentParsing("a\\\\\\\\\"g c\" d e", "a\\\\g c", "d", "e"); 302 303 // treatment of back-slashes 304 checkArgumentParsing("*\\", "*\\"); 305 checkArgumentParsing("*/", "*/"); 306 checkArgumentParsing(".\\*", ".\\*"); 307 checkArgumentParsing("./*", "./*"); 308 checkArgumentParsing("..\\..\\*", "..\\..\\*"); 309 checkArgumentParsing("../../*", "../../*"); 310 checkArgumentParsing("..\\..\\", "..\\..\\"); 311 checkArgumentParsing("../../", "../../"); 312 checkArgumentParsing("a b\\ c", "a", "b\\", "c"); 313 checkArgumentParsing("\\\\?", "\\\\?"); 314 315 // more treatment of mixed slashes 316 checkArgumentParsing("f1/ f3\\ f4/", "f1/", "f3\\", "f4/"); 317 checkArgumentParsing("f1/ f2\' ' f3/ f4/", "f1/", "f2\'", "'", "f3/", "f4/"); 318 } 319 320 private void initEmptyDir(File emptyDir) throws IOException { 321 if (emptyDir.exists()) { 322 recursiveDelete(emptyDir); 323 } 324 emptyDir.mkdir(); 325 } 326 327 private void initDirWithJavaFiles(File libDir) throws IOException { 328 329 if (libDir.exists()) { 330 recursiveDelete(libDir); 331 } 332 libDir.mkdirs(); 333 ArrayList<String> scratchpad = new ArrayList<>(); | 293 checkArgumentParsing("X\\Y\\Z", "X\\Y\\Z"); 294 checkArgumentParsing("\\X\\Y\\Z", "\\X\\Y\\Z"); 295 296 // literals within dangling quotes, etc. 297 checkArgumentParsing("\"a b c\" d e", "a b c", "d", "e"); 298 checkArgumentParsing("\"ab\\\"c\" \"\\\\\" d", "ab\"c", "\\", "d"); 299 checkArgumentParsing("a\\\\\\c d\"e f\"g h", "a\\\\\\c", "de fg", "h"); 300 checkArgumentParsing("a\\\\\\\"b c d", "a\\\"b", "c", "d"); 301 checkArgumentParsing("a\\\\\\\\\"g c\" d e", "a\\\\g c", "d", "e"); 302 303 // treatment of back-slashes 304 checkArgumentParsing("*\\", "*\\"); 305 checkArgumentParsing("*/", "*/"); 306 checkArgumentParsing(".\\*", ".\\*"); 307 checkArgumentParsing("./*", "./*"); 308 checkArgumentParsing("..\\..\\*", "..\\..\\*"); 309 checkArgumentParsing("../../*", "../../*"); 310 checkArgumentParsing("..\\..\\", "..\\..\\"); 311 checkArgumentParsing("../../", "../../"); 312 checkArgumentParsing("a b\\ c", "a", "b\\", "c"); 313 // 2 back-slashes 314 checkArgumentParsing("\\\\?", "\\\\?"); 315 // 3 back-slashes 316 checkArgumentParsing("\\\\\\?", "\\\\\\?"); 317 // 4 back-slashes 318 checkArgumentParsing("\\\\\\\\?", "\\\\\\\\?"); 319 // 5 back-slashes 320 checkArgumentParsing("\\\\\\\\\\?", "\\\\\\\\\\?"); 321 // 6 back-slashes 322 checkArgumentParsing("\\\\\\\\\\\\?", "\\\\\\\\\\\\?"); 323 324 // more treatment of mixed slashes 325 checkArgumentParsing("f1/ f3\\ f4/", "f1/", "f3\\", "f4/"); 326 checkArgumentParsing("f1/ f2\' ' f3/ f4/", "f1/", "f2\'", "'", "f3/", "f4/"); 327 } 328 329 private void initEmptyDir(File emptyDir) throws IOException { 330 if (emptyDir.exists()) { 331 recursiveDelete(emptyDir); 332 } 333 emptyDir.mkdir(); 334 } 335 336 private void initDirWithJavaFiles(File libDir) throws IOException { 337 338 if (libDir.exists()) { 339 recursiveDelete(libDir); 340 } 341 libDir.mkdirs(); 342 ArrayList<String> scratchpad = new ArrayList<>(); |