JAL-3141 Fixed tests
authorBen Soares <bsoares@dundee.ac.uk>
Fri, 24 May 2019 09:05:10 +0000 (10:05 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Fri, 24 May 2019 09:05:10 +0000 (10:05 +0100)
test/jalview/io/BackupFilesTest.java
test/jalview/io/testProps.jvprops

index 6b5fef6..045b589 100644 (file)
@@ -61,7 +61,7 @@ public class BackupFilesTest
 
   private static String suffix = "_BACKUPTEST-%n";
 
-  private static int digits = 8;
+  private static int digits = 6;
 
   private static int rollMax = 2;
 
@@ -108,27 +108,27 @@ public class BackupFilesTest
 
     // check 10 backup files
     HashMap<Integer, String> correctindexmap = new HashMap<>();
-    correctindexmap.put(1, "backupfilestestTemp.fa_BACKUPTEST-00000001");
-    correctindexmap.put(2, "backupfilestestTemp.fa_BACKUPTEST-00000002");
-    correctindexmap.put(3, "backupfilestestTemp.fa_BACKUPTEST-00000003");
-    correctindexmap.put(4, "backupfilestestTemp.fa_BACKUPTEST-00000004");
-    correctindexmap.put(5, "backupfilestestTemp.fa_BACKUPTEST-00000005");
-    correctindexmap.put(6, "backupfilestestTemp.fa_BACKUPTEST-00000006");
-    correctindexmap.put(7, "backupfilestestTemp.fa_BACKUPTEST-00000007");
-    correctindexmap.put(8, "backupfilestestTemp.fa_BACKUPTEST-00000008");
-    correctindexmap.put(9, "backupfilestestTemp.fa_BACKUPTEST-00000009");
-    correctindexmap.put(10, "backupfilestestTemp.fa_BACKUPTEST-00000010");
+    correctindexmap.put(1, "backupfilestestTemp.fa_BACKUPTEST-000001");
+    correctindexmap.put(2, "backupfilestestTemp.fa_BACKUPTEST-000002");
+    correctindexmap.put(3, "backupfilestestTemp.fa_BACKUPTEST-000003");
+    correctindexmap.put(4, "backupfilestestTemp.fa_BACKUPTEST-000004");
+    correctindexmap.put(5, "backupfilestestTemp.fa_BACKUPTEST-000005");
+    correctindexmap.put(6, "backupfilestestTemp.fa_BACKUPTEST-000006");
+    correctindexmap.put(7, "backupfilestestTemp.fa_BACKUPTEST-000007");
+    correctindexmap.put(8, "backupfilestestTemp.fa_BACKUPTEST-000008");
+    correctindexmap.put(9, "backupfilestestTemp.fa_BACKUPTEST-000009");
+    correctindexmap.put(10, "backupfilestestTemp.fa_BACKUPTEST-000010");
     HashMap<Integer, String> wrongindexmap = new HashMap<>();
     wrongindexmap.put(1, "backupfilestestTemp.fa_BACKUPTEST-1");
-    wrongindexmap.put(2, "backupfilestestTemp.fa_BACKUPTEST-00000002");
-    wrongindexmap.put(3, "backupfilestestTemp.fa_BACKUPTEST-00000003");
-    wrongindexmap.put(4, "backupfilestestTemp.fa_BACKUPTEST-00000004");
-    wrongindexmap.put(5, "backupfilestestTemp.fa_BACKUPTEST-00000005");
-    wrongindexmap.put(6, "backupfilestestTemp.fa_BACKUPTEST-00000006");
-    wrongindexmap.put(7, "backupfilestestTemp.fa_BACKUPTEST-00000007");
-    wrongindexmap.put(8, "backupfilestestTemp.fa_BACKUPTEST-00000008");
-    wrongindexmap.put(9, "backupfilestestTemp.fa_BACKUPTEST-00000009");
-    wrongindexmap.put(10, "backupfilestestTemp.fa_BACKUPTEST-00000010");
+    wrongindexmap.put(2, "backupfilestestTemp.fa_BACKUPTEST-000002");
+    wrongindexmap.put(3, "backupfilestestTemp.fa_BACKUPTEST-000003");
+    wrongindexmap.put(4, "backupfilestestTemp.fa_BACKUPTEST-000004");
+    wrongindexmap.put(5, "backupfilestestTemp.fa_BACKUPTEST-000005");
+    wrongindexmap.put(6, "backupfilestestTemp.fa_BACKUPTEST-000006");
+    wrongindexmap.put(7, "backupfilestestTemp.fa_BACKUPTEST-000007");
+    wrongindexmap.put(8, "backupfilestestTemp.fa_BACKUPTEST-000008");
+    wrongindexmap.put(9, "backupfilestestTemp.fa_BACKUPTEST-000009");
+    wrongindexmap.put(10, "backupfilestestTemp.fa_BACKUPTEST-000010");
     int[] indexes2 = { 3, 4, 5, 6, 7, 8, 9, 10 };
     int[] indexes3 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
     Assert.assertTrue(checkBackupFiles(correctindexmap));
@@ -159,8 +159,8 @@ public class BackupFilesTest
     // check there are "rollMax" backup files and they are all saved correctly
     // check 10 backup files
     HashMap<Integer, String> correctindexmap = new HashMap<>();
-    correctindexmap.put(9, "backupfilestestTemp.fa_BACKUPTEST-00000009");
-    correctindexmap.put(10, "backupfilestestTemp.fa_BACKUPTEST-00000010");
+    correctindexmap.put(9, "backupfilestestTemp.fa_BACKUPTEST-000009");
+    correctindexmap.put(10, "backupfilestestTemp.fa_BACKUPTEST-000010");
     int[] indexes2 = { 10 };
     int[] indexes3 = { 8, 9, 10 };
     Assert.assertTrue(checkBackupFiles(correctindexmap));
@@ -190,8 +190,8 @@ public class BackupFilesTest
     // check there are "rollMax" backup files and they are all saved correctly
     // check 10 backup files
     HashMap<Integer, String> correctindexmap = new HashMap<>();
-    correctindexmap.put(1, "backupfilestestTemp.fa_BACKUPTEST-00000001");
-    correctindexmap.put(2, "backupfilestestTemp.fa_BACKUPTEST-00000002");
+    correctindexmap.put(1, "backupfilestestTemp.fa_BACKUPTEST-000001");
+    correctindexmap.put(2, "backupfilestestTemp.fa_BACKUPTEST-000002");
     int[] indexes2 = { 1 };
     int[] indexes3 = { 1, 2, 3 };
     Assert.assertTrue(checkBackupFiles(correctindexmap));
index cb92ecf..94bc5d9 100644 (file)
@@ -3,8 +3,8 @@
 #
 BACKUPFILES_ENABLED=true
 BACKUPFILES_PRESET=0
-BACKUPFILES_SAVED=_BACKUPFILESTESTTMP%n\t8\tfalse\tfalse\t2\tfalse
-BACKUPFILES_CUSTOM=_BACKUPFILESTESTTMP%n\t8\tfalse\tfalse\t2\tfalse
+BACKUPFILES_SAVED=_BACKUPFILESTESTTMP%n\t6\tfalse\tfalse\t2\tfalse
+BACKUPFILES_CUSTOM=_BACKUPFILESTESTTMP%n\t6\tfalse\tfalse\t2\tfalse
 SCREEN_Y=768
 SCREEN_X=936
 SHOW_WSDISCOVERY_ERRORS=true