Improve logic for automatic selection names
[alexxy/gromacs.git] / src / gromacs / selection / tests / selectioncollection.cpp
index 8521a27d444767bb0e6bedd6768cb07f3564174e..c04539a03fe54ac7c4631ef734fe1af79824c7e9 100644 (file)
@@ -972,7 +972,12 @@ TEST_F(SelectionCollectionDataTest, HandlesIndexGroupsInSelections)
         "group \"GrpA\"",
         "GrpB",
         "1",
-        "group \"GrpB\" and resname RB"
+        // These test that the name of the group is not too eagerly promoted to
+        // the name of the selection.
+        "group \"GrpB\" and resname RB",
+        "group \"GrpA\" permute 5 3 2 1 4",
+        "group \"GrpA\" plus group \"GrpB\"",
+        "res_cog of group \"GrpA\""
     };
     setFlags(TestFlags() | efTestSelectionNames);
     ASSERT_NO_THROW_GMX(loadIndexGroups("simple.ndx"));