Merge pull request #1633 from wing328/fix_window_test_case

Add exception handling in the test case (for Windows)
This commit is contained in:
wing328 2015-11-30 13:24:13 +08:00
commit d7460dac32

View File

@ -109,7 +109,12 @@ public class OnlineGeneratorOptionsTest {
outputFilename = Generator.generateClient(provider.getLanguage(), input);
}
final File dir = new File(new File(outputFilename).getParent());
FileUtils.deleteDirectory(dir);
try {
FileUtils.deleteDirectory(dir);
} catch (Exception e) { // directory can't be deleted for some reasons
e.printStackTrace();
}
for (InvocationCounter option : options.values()) {
assertNotEquals(option.getCounter(), 0, String.format("Option \"%s\" wasn't processed.",
option.getValue()));