File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
main/java/com/googlecode/scheme2ddl
test/java/com/googlecode/scheme2ddl Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ private static void collectArgs(String[] args) throws Exception {
337
337
String msg = "Unknown argument: " + arg ;
338
338
System .err .println (msg );
339
339
printUsage ();
340
- throw new Exception ("" );
340
+ throw new Exception (msg );
341
341
}
342
342
}
343
343
}
Original file line number Diff line number Diff line change @@ -75,5 +75,11 @@ public void testPrintVersionOption() throws Exception {
75
75
assertThat (outContent .toString (), containsString ("scheme2ddl version " ));
76
76
}
77
77
78
+ @ Test (expectedExceptions = Exception .class , expectedExceptionsMessageRegExp = "Unknown argument: .*" )
79
+ public void testUnknownArgument () throws Exception {
80
+ String [] args = {"-xYx" };
81
+ Main .main (args );
82
+ }
83
+
78
84
79
85
}
You can’t perform that action at this time.
0 commit comments