diff --git a/unicodetools/src/main/java/org/unicode/text/UCD/TestUnicodeInvariants.java b/unicodetools/src/main/java/org/unicode/text/UCD/TestUnicodeInvariants.java index 7dbb5caf8..36193d799 100644 --- a/unicodetools/src/main/java/org/unicode/text/UCD/TestUnicodeInvariants.java +++ b/unicodetools/src/main/java/org/unicode/text/UCD/TestUnicodeInvariants.java @@ -144,6 +144,9 @@ private static BufferedReader getInputReader(String inputFile) throws IOExceptio * @throws IOException */ public static int testInvariants(String inputFile, boolean doRange) throws IOException { + if (inputFile == null) { + inputFile = DEFAULT_FILE; + } TestUnicodeInvariants.doRange = doRange; parseErrorCount = 0; testFailureCount = 0; @@ -152,7 +155,9 @@ public static int testInvariants(String inputFile, boolean doRange) throws IOExc FileUtilities.openUTF8Writer( Settings.Output.GEN_DIR, "UnicodeTestResults" - + (inputFile == null ? "" : "-" + inputFile.split("\\.")[0]) + + (inputFile.equals(DEFAULT_FILE) + ? "" + : "-" + inputFile.split("\\.")[0]) + "." + (doHtml ? "html" : "txt"))) { final StringWriter writer = new StringWriter();