diff --git a/picocli-codegen/src/test/java/picocli/codegen/docgen/manpage/Issue2145.java b/picocli-codegen/src/test/java/picocli/codegen/docgen/manpage/Issue2145.java new file mode 100644 index 000000000..cee4693d7 --- /dev/null +++ b/picocli-codegen/src/test/java/picocli/codegen/docgen/manpage/Issue2145.java @@ -0,0 +1,24 @@ +package picocli.codegen.docgen.manpage; + +import org.junit.Test; +import picocli.CommandLine; + +import static org.junit.Assert.*; + +public class Issue2145 { + + @CommandLine.Command( + name = "documentation", + description = "Command to generate CLI documentation", + subcommands = ManPageGenerator.class + ) + static class Documentation { + + } + + @Test + public void testManPageGenAsSubcommand() { + int result = new CommandLine(new Documentation()).execute("gen-manpage", "-dout", "-v"); + assertEquals(0, result); + } +}