Test robustness

* SelfTestBase.java
    don't allow negative random passwords, in case leading '-' is causing problems
* Heritrix.java
    echo arguments when showing usage info -- to understand what went wrong
This commit is contained in:
gojomo committed 2009-05-12 02:10:37 +00:00
1 parent daf5ed7590
commit c8a5446695
2 files changed
+6 -5

No files matched your search

@@ -113,9 +113,10 @@ public class Heritrix {
private static final String STARTLOG = "heritrix_dmesg.log";
private static void usage(PrintStream out) {
private static void usage(PrintStream out, String[] args) {
HelpFormatter hf = new HelpFormatter();
hf.printHelp("Heritrix", options());
out.print("Your arguments were: "+args);
}
@@ -161,12 +162,12 @@ public class Heritrix {
try {
cl = clp.parse(options(), args);
} catch (ParseException e) {
usage(out);
usage(out, args);
return null;
}
if (cl.getArgList().size() != 0) {
usage(out);
usage(out, args);
return null;
}
@@ -215,7 +216,7 @@ public class Heritrix {
if (cl == null) return;
if (cl.hasOption('h')) {
usage(startupOut);
usage(startupOut, args);
return ;
}