2006/unicorn/org/w3c/unicorn/tests UnicornClient.java,1.8,1.9

Update of /sources/public/2006/unicorn/org/w3c/unicorn/tests
In directory hutz:/tmp/cvs-serv13385/org/w3c/unicorn/tests

Modified Files:
	UnicornClient.java 
Log Message:
added the help option for the command line unicorn application

Index: UnicornClient.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tests/UnicornClient.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- UnicornClient.java	17 Jun 2008 13:45:31 -0000	1.8
+++ UnicornClient.java	19 Jun 2008 12:50:54 -0000	1.9
@@ -45,7 +45,10 @@
 	public static void main(String[] args) {
 		UnicornCall aUnicornCall = new UnicornCall();
 		
-		
+		if(args.length==1){
+			if(args[0].equals("help"))print_help();
+		}
+		else{
 		// read parameters
 		String task = args[0];
 		String pageToValid = args[1];
@@ -56,6 +59,7 @@
 			pParams = args[4]; 
 		}
 		
+		
 
 		//parse other parameters: "x2=on,toto=titi" to a map<String,String[]>  
 		if (pParams.length()!=0) {
@@ -107,7 +111,6 @@
 				e.printStackTrace();
 			}
 		}
-		
 		aUnicornCall.setTask(task); //task id
 		aUnicornCall.setLang(language);
 
@@ -132,4 +135,5 @@
 		long after = System.currentTimeMillis() ;
 		System.out.println("Elapsed time (s): "+(double)(after - before)/1000);
 	}
+	}
 }

Received on Thursday, 19 June 2008 12:51:30 UTC