|
1 | 1 | /* |
2 | | - * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
@@ -341,9 +341,33 @@ private static Collection<Arguments> test_ARGUMENTS() { |
341 | 341 | Arguments.of("abc", List.of("abc")), |
342 | 342 | Arguments.of("a b c", List.of("a", "b", "c")), |
343 | 343 | Arguments.of("a=10 -Dorg.acme.name='John Smith' c=\\\"foo\\\"", List.of("a=10", "-Dorg.acme.name=John Smith", "c=\"foo\"")), |
| 344 | + Arguments.of(" foo \"a b c\" v=' John Smith ' 'H e ll o' ", List.of("foo", "a b c", "v= John Smith ", "H e ll o")), |
344 | 345 | Arguments.of("\"\"", List.of("")), |
345 | 346 | Arguments.of(" ", List.of()), |
346 | | - Arguments.of("", List.of()) |
| 347 | + Arguments.of(" ", List.of()), |
| 348 | + Arguments.of(" foo ", List.of("foo")), |
| 349 | + Arguments.of("", List.of()), |
| 350 | + Arguments.of("'fo\"o'\\ buzz \"b a r\"", List.of("fo\"o\\ buzz", "b a r")), |
| 351 | + Arguments.of("a\\ 'b\"c'\\ d", List.of("a\\ b\"c\\ d")), |
| 352 | + Arguments.of("\"a 'bc' d\"", List.of("a 'bc' d")), |
| 353 | + Arguments.of("\'a 'bc' d\'", List.of("a bc d")), |
| 354 | + Arguments.of("\"a \\'bc\\' d\"", List.of("a 'bc' d")), |
| 355 | + Arguments.of("\'a \\'bc\\' d\'", List.of("a 'bc' d")), |
| 356 | + Arguments.of("'a b c' 'd e f'", List.of("a b c", "d e f")), |
| 357 | + Arguments.of("'a b c' \"'d e f' h", List.of("a b c", "'d e f' h")), |
| 358 | + Arguments.of("'a b c' \"'d e f' \t ", List.of("a b c", "'d e f'")), |
| 359 | + Arguments.of(" a='' '' \t '\\'\\'' \"\" \"\\\"\\\"\" ", List.of("a=", "", "\'\'", "", "\"\"")), |
| 360 | + Arguments.of("' \'foo '", List.of(" foo", "")), |
| 361 | + Arguments.of("' \'foo ' bar", List.of(" foo", " bar")), |
| 362 | + Arguments.of("' \'foo\\ '", List.of(" foo\\ ")), |
| 363 | + Arguments.of("'fo\"o buzz \"b a r\"", List.of("fo\"o buzz \"b a r\"")), |
| 364 | + Arguments.of("'", List.of("")), |
| 365 | + Arguments.of("' f g ", List.of(" f g")), |
| 366 | + Arguments.of("' f g", List.of(" f g")), |
| 367 | + Arguments.of("'\\'", List.of("'")), |
| 368 | + Arguments.of("'\\' ", List.of("'")), |
| 369 | + Arguments.of("'\\' a ", List.of("' a")), |
| 370 | + Arguments.of("\"" + "\\\"".repeat(10000) + "A", List.of("\"".repeat(10000) + "A")) |
347 | 371 | ); |
348 | 372 | } |
349 | 373 |
|
|
0 commit comments