Fix multiple issues when expanding argfiles

- treat a contiguous whitespace sequence as a single argument separator,
  not as several empty-string arguments separated by whitespaces
- fix infinite loop when reading unfinished quoted argument
- do not attempt to perform escape if the backslash is the last
  character in the file
This commit is contained in:
Alexander Udalov
2018-05-25 14:45:22 +02:00
committed by Dmitry Savvinov
parent 61902e1fd5
commit 06d97cce51
5 changed files with 34 additions and 11 deletions
@@ -71,6 +71,11 @@ public class CliTestGenerated extends AbstractCliTest {
runTest("compiler/testData/cli/jvm/argfileWithEscaping.args");
}
@TestMetadata("argfileWithUnfinishedQuoteAndEscape.args")
public void testArgfileWithUnfinishedQuoteAndEscape() throws Exception {
runTest("compiler/testData/cli/jvm/argfileWithUnfinishedQuoteAndEscape.args");
}
@TestMetadata("argumentPassedMultipleTimes.args")
public void testArgumentPassedMultipleTimes() throws Exception {
runTest("compiler/testData/cli/jvm/argumentPassedMultipleTimes.args");