コード例 #1
0
  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"));
  }
コード例 #2
0
  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"));
  }