List<String> aliases = done.remove(entry.getValue()); if (aliases != null) { // otherwise we already processed this command by another alias addSubcommand(aliases, entry.getValue());
@SuppressWarnings("deprecation") @Test public void testAddSubcommand() { @Command(name = "app", mixinStandardHelpOptions = true) class App { } Help help = new Help(new CommandLine(CommandSpec.create()).getCommandSpec(), new Help.ColorScheme(Help.Ansi.OFF)); help.addSubcommand("boo", new App()); assertEquals(1, help.subcommands().size()); assertEquals("app", help.subcommands().get("boo").commandSpec().name()); }
List<String> aliases = done.remove(entry.getValue()); if (aliases != null) { // otherwise we already processed this command by another alias addSubcommand(aliases, entry.getValue());
@SuppressWarnings("deprecation") @Test public void testAddSubcommand() { @Command(name = "app", mixinStandardHelpOptions = true) class App { } Help help = new Help(new CommandLine(CommandSpec.create()).getCommandSpec(), new Help.ColorScheme(Help.Ansi.OFF)); help.addSubcommand("boo", new App()); assertEquals(1, help.subcommands().size()); assertEquals("app", help.subcommands().get("boo").commandSpec().name()); }