Ejemplo n.º 1
0
    public static String _c1(c1options x) {

      assertEquals(true, x.flag());
      assertEquals(33, x.a());
      assertEquals("bb", x.bb(), "bb");
      assertEquals(Arrays.asList(new File("f1.txt"), new File("f2.txt")), x.input());
      assertEquals(false, x.notset());
      assertEquals(Arrays.asList("-a", "--a", "a"), x._arguments());

      return "a";
    }
Ejemplo n.º 2
0
  public void testCommand() throws Exception {
    CommandLine getopt = new CommandLine(rp);
    assertEquals("[cmda, cmdb]", getopt.getCommands(new X()).keySet().toString());

    getopt.execute(new X(), "cmda", Arrays.asList("-e", "help"));
  }