Merge branch 'develop' into merged_2_11_2_0_to_2_12
[jalview.git] / test / jalview / analysis / FinderTest.java
index 95e6c0d..319c998 100644 (file)
@@ -68,7 +68,7 @@ public class FinderTest
   public void setUp()
   {
     Cache.loadProperties("test/jalview/io/testProps.jvprops");
-    Cache.applicationProperties.setProperty("PAD_GAPS",
+    Cache.setPropertyNoSave("PAD_GAPS",
             Boolean.FALSE.toString());
 
     //@formatter:off
@@ -123,6 +123,20 @@ public class FinderTest
     assertEquals(matches.get(1).getEnd(), 6);
   }
 
+  @Test(groups = "Functional")
+  public void testFind_findAll()
+  {
+    /*
+     * simple JAL-3765 test
+     * single symbol should find *all* matching symbols 
+     */
+    Finder f = new Finder(av);
+    f.findAll("M", false, false, false);
+    SearchResultsI sr = f.getSearchResults();
+    assertEquals(sr.getCount(), 5);
+
+  }
+
   /**
    * Test for (undocumented) find residue by position
    */
@@ -562,7 +576,7 @@ public class FinderTest
     sg.addSequence(al.getSequenceAt(1), false);
     sg.addSequence(al.getSequenceAt(2), false);
     av.setSelectionGroup(sg);
-  
+
     /*
      * search for 'e' should match two sequence ids and one residue
      */
@@ -628,8 +642,8 @@ public class FinderTest
   }
 
   /**
-   * Test that find does not report hidden positions, but does report matches that
-   * span hidden gaps
+   * Test that find does not report hidden positions, but does report matches
+   * that span hidden gaps
    */
   @Test(groups = "Functional")
   public void testFind_withHiddenColumns()
@@ -757,7 +771,7 @@ public class FinderTest
      * --bcdEFH
      * aa---aMMMMMaaa
      */
-  
+
     /*
      * hide columns 2-4 and 6-7
      */
@@ -765,7 +779,7 @@ public class FinderTest
     hc.hideColumns(2, 4);
     hc.hideColumns(6, 7);
     al.setHiddenColumns(hc);
-  
+
     /*
      * select rows 2-3
      */