aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-06-27 11:56:15 +0200
committerMattias Andrée <maandree@operamail.com>2013-06-27 11:56:15 +0200
commit85898c5a6bbc1db1113da2ddd9acb4db09ba3a46 (patch)
tree45c873b1995ab0a88e9012431184d3bd1b56379b /src
parentoption classes in java version can be static and should hence be so (diff)
downloadargparser-85898c5a6bbc1db1113da2ddd9acb4db09ba3a46.tar.gz
argparser-85898c5a6bbc1db1113da2ddd9acb4db09ba3a46.tar.bz2
argparser-85898c5a6bbc1db1113da2ddd9acb4db09ba3a46.tar.xz
add options to java test
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/Test.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Test.java b/src/Test.java
index c593b4e..e6c5a18 100644
--- a/src/Test.java
+++ b/src/Test.java
@@ -40,6 +40,13 @@ public class Test
"You should have received a copy of the GNU General Public License\n" +
"along with this library. If not, see <http://www.gnu.org/licenses/>.", null, true);
+ parser.add(new ArgParser.Argumentless(0, "-h", "-?", "--help"), "Prints this help message\n(and exits)");
+ parser.add(new ArgParser.Argumentless(0, "--hello"), "Prints the text: hello world");
+ parser.add(new ArgParser.Argumentless(0, "++hidden"));
+
+ parser.add(new ArgParser.Argumented("LINE", 0, "-l", "--line"), "Prints the choosen line");
+ parser.add(new ArgParser.Variadic("LINE", 0, "--l", "--lines"), "Prints the choosen lines");
+
parser.parse(args);
parser.supportAlternatives();