CommandLineOptionsTest.java revision f0ca07e08967a974684daffd32316cc9f9b98150
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * CDDL HEADER START
16f816d3f3c32ae3351834253f52ddd0212bcbf3Timo Sirainen * The contents of this file are subject to the terms of the
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen * Common Development and Distribution License (the "License").
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen * You may not use this file except in compliance with the License.
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen * See LICENSE.txt included in this distribution for the specific
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * language governing permissions and limitations under the License.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * When distributing Covered Code, include this CDDL HEADER in each
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * file and include the License file at LICENSE.txt.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * If applicable, add the following below this CDDL HEADER, with the
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * fields enclosed by brackets "[]" replaced with your own identifying
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * information: Portions Copyright [yyyy] [name of copyright owner]
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * CDDL HEADER END
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * Use is subject to license terms.
d35fee8d1e5e31614dba5e64d45ed23c7d6bfa53Timo Sirainen * Check the CommandLineOption class
d35fee8d1e5e31614dba5e64d45ed23c7d6bfa53Timo Sirainen * @author Trond Norbye
eddd9bf1a1369aea4a2715f6be1137da6d17d293Timo Sirainen public static void setUpClass() throws Exception {
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen public static void tearDownClass() throws Exception {
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen public void setUp() {
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen public void tearDown() {
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * Test of getCommandString method, of class CommandLineOptions.
6e235046e1d8e9d89fc948f5c623676c20421a28Timo Sirainen public void testCommandLineOptions() throws IOException {
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen CommandLineOptions instance = new CommandLineOptions();
d9fdacd5fb3e07997e5c389739d2054f0c8441d8Timo Sirainen String cmdString = instance.getCommandString();
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen if (c != ':') {
abe7afb8f1766fbcef1b9df513109e43d7d16e49Timo Sirainen Iterator<CommandLineOptions.Option> iter = instance.getOptionsIterator();
2131ef7a3390f15ea6a958256ea54908f1096350Timo Sirainen public void bug3042() {
2131ef7a3390f15ea6a958256ea54908f1096350Timo Sirainen CommandLineOptions instance = new CommandLineOptions();
2131ef7a3390f15ea6a958256ea54908f1096350Timo Sirainen String cmdString = instance.getCommandString();
abe7afb8f1766fbcef1b9df513109e43d7d16e49Timo Sirainen assertEquals("-?\n\tHelp", instance.getCommandUsage('?'));
69e03a846f6980144aa75bff0590c04852bffbbcTimo Sirainen public void rfe3041() {
69e03a846f6980144aa75bff0590c04852bffbbcTimo Sirainen CommandLineOptions instance = new CommandLineOptions();
69e03a846f6980144aa75bff0590c04852bffbbcTimo Sirainen String cmdString = instance.getCommandString();
69e03a846f6980144aa75bff0590c04852bffbbcTimo Sirainen assertEquals("-V\n\tPrint version and quit", instance.getCommandUsage('V'));