public void testArglineWithNewline() throws IOException, SurefireBooterForkException { // SUREFIRE-657 File cpElement = getTempClasspathFile(); ForkConfiguration forkConfiguration = getForkConfiguration("abc\ndef", null); final Commandline commandLine = forkConfiguration.createCommandLine( Collections.singletonList(cpElement.getAbsolutePath()), false, false); assertTrue(commandLine.toString().contains("abc def")); }
public void testCreateCommandLine_UseSystemClassLoaderForkOnce_ShouldConstructManifestOnlyJar() throws IOException, SurefireBooterForkException { ForkConfiguration config = getForkConfiguration(null, "java"); File cpElement = getTempClasspathFile(); Commandline cli = config.createCommandLine( Collections.singletonList(cpElement.getAbsolutePath()), true, false); String line = StringUtils.join(cli.getCommandline(), " "); assertTrue(line.contains("-jar")); }