public void run(String[] args) throws Exception { Option[]opts = OPTS; String sopts = getShortOpts(opts); Getopt g = new Getopt("jcpp", args, sopts, opts); int c; break; case 2: // --version version(System.out); return; case 'v': break; case 'h': usage(getClass().getName(), opts); return; default:
.withRequiredArg().ofType(File.class).describedAs("dir"); OptionSpec<String> warningOption = parser.acceptsAll(Arrays.asList("warning", "W"), "Enables the named warning class (" + getWarnings() + ").") .withRequiredArg().ofType(String.class).describedAs("warning"); OptionSpec<Void> noWarningOption = parser.acceptsAll(Arrays.asList("no-warnings", "w"), version(System.out); return;
public void testMain() throws Exception { Main.main(new String[] { "--version" }); }
public void run(String[] args) throws Exception { Option[]opts = OPTS; String sopts = getShortOpts(opts); Getopt g = new Getopt("jcpp", args, sopts, opts); int c; break; case 2: // --version version(System.out); return; case 'v': break; case 'h': usage(getClass().getName(), opts); return; default:
@Test public void testMain() throws Exception { Main.main(new String[]{"--version"}); } }