Fix test suite cleanup (fixes #206)

Change-Id: Ib6ffeef750f66d28278219b23bfad5b6cc4e79b2
diff --git a/Changes b/Changes
index 9f159b0..db65563 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
 0.64.1 2025-05-26
     - [bugfix] Ignore line endings in indexer tests. (diewald)
+    - [bugfix] Correctly cleanup test directories. (diewald)
 
 0.64.0 2025-04-30
     - [feature] Support signed matchids to prevent consecutive
diff --git a/src/test/java/de/ids_mannheim/korap/TestIndexer.java b/src/test/java/de/ids_mannheim/korap/TestIndexer.java
index 8cc7694..b2a2792 100644
--- a/src/test/java/de/ids_mannheim/korap/TestIndexer.java
+++ b/src/test/java/de/ids_mannheim/korap/TestIndexer.java
@@ -29,6 +29,7 @@
     private static File outputDirectory = new File("test-index");

     private static File outputDirectory2 = new File("test-index2");

     private static File outputDirectory3 = new File("test-output");

+    private static File outputDirectory4 = new File("test-output-1");

 

     @Test

     public void testArguments () throws IOException {

@@ -144,7 +145,10 @@
             deleteFile(outputDirectory2);

         }

         if (outputDirectory3.exists()) {

-            deleteFile(outputDirectory2);

+            deleteFile(outputDirectory3);

+        }

+        if (outputDirectory4.exists()) {

+            deleteFile(outputDirectory4);

         }

     }

 

@@ -164,6 +168,10 @@
             logger.debug("Output directory 3 exists");

             deleteFile(outputDirectory3);

         }

+        if (outputDirectory4.exists()) {

+            logger.debug("Output directory 4 exists");

+            deleteFile(outputDirectory4);

+        }

     }

 

     private static void deleteFile (File path) {