ottlinger commented on code in PR #195:
URL: https://github.com/apache/creadur-rat/pull/195#discussion_r1451628369
##########
apache-rat-plugin/src/test/java/org/apache/rat/mp/util/ScmIgnoreParserTest.java:
##########
@@ -86,13 +84,19 @@ public void
parseFromTargetDirectoryHopefullyWithoutSCMIgnores() {
@Test
public void parseFromEmptyIgnoreFile() throws IOException {
- File ignore = testFolder.newFile();
- assertTrue(ignore.exists());
- writeToFile(IGNORE_EXAMPLE, ignore);
+ File ignore = null;
+ try {
+ ignore = Files.createTempFile("sip", null).toFile();
+ assertTrue(ignore.exists());
+ writeToFile(IGNORE_EXAMPLE, ignore);
+
+ final List<String> excludes = getExcludesFromFile(log, ignore);
+ assertFalse(excludes.isEmpty());
+ assertEquals(2, excludes.size());
+ } finally {
+ ignore.delete();
+ }
Review Comment:
More @TempDir ......
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]