diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
 # Revision history for tasty-sugar
 
+## 1.0.1.1 -- 2021-01-18
+
+ * Fix error where an expected set of matches could match multiple
+   root names where the root names contain separators.
+
 ## 1.0.1.0 -- 2021-01-18
 
  * Associated files are now ranked based on the number of parameter
diff --git a/src/internal/Test/Tasty/Sugar/Analysis.hs b/src/internal/Test/Tasty/Sugar/Analysis.hs
--- a/src/internal/Test/Tasty/Sugar/Analysis.hs
+++ b/src/internal/Test/Tasty/Sugar/Analysis.hs
@@ -47,7 +47,23 @@
   let seps = separators pat
       params = validParams pat
       combineExpRes (swts, expl) = bimap (swts :) (expl :)
+
+      trimSweets :: [(Sweets, SweetExplanation)] ->
+                    [(Sweets, SweetExplanation)]
+      trimSweets =
+        -- If multiple Sweets have the same rootMatchName, use the one
+        -- with the longer rootBaseName.  This prevents "foo.exp" and
+        -- "foo-bar.exp" from both matching "foo-bar.c".
+        (\l -> let removeShorterBases lst (entry,_) =
+                     let notShorterBase (s,_) = not $
+                           and [ rootMatchName s == rootMatchName entry
+                               , rootBaseName s < rootBaseName entry
+                               ]
+                     in filter notShorterBase lst
+               in foldl removeShorterBases l l)
+
   in foldr combineExpRes ([], []) $
+     trimSweets $
      catMaybes $
      fmap (findExpectation pat rootNm allNames) $
      observeAll $
diff --git a/tasty-sugar.cabal b/tasty-sugar.cabal
--- a/tasty-sugar.cabal
+++ b/tasty-sugar.cabal
@@ -1,7 +1,7 @@
 cabal-version:       2.0
 
 name:                tasty-sugar
-version:             1.0.1.0
+version:             1.0.1.1
 synopsis:            Tests defined by Search Using Golden Answer References
 description:
   .
diff --git a/test/Sample1.hs b/test/Sample1.hs
--- a/test/Sample1.hs
+++ b/test/Sample1.hs
@@ -24,6 +24,11 @@
 looping.ppc.expected
 looping.x86.exe
 looping.x86.expected
+looping-around.c
+looping-around.ppc.exe
+looping-around.ppc.expected
+looping-around.x86.exe
+looping-around.expected
 Makefile
 README.org
 switching
diff --git a/test/TestMultiAssoc.hs b/test/TestMultiAssoc.hs
--- a/test/TestMultiAssoc.hs
+++ b/test/TestMultiAssoc.hs
@@ -38,9 +38,9 @@
        -- This is simply the number of entries in sample1; if this
        -- fails in means that sample1 has been changed and the other
        -- tests here are likely to need updating.
-       testCase "valid sample" $ 53 @=? length sample1
+       testCase "valid sample" $ 58 @=? length sample1
 
-     , sugarTestEq "correct found count" sugarCube sample1 5 length
+     , sugarTestEq "correct found count" sugarCube sample1 6 length
 
      , testCase "results" $ compareBags "results" sugar1 $
        let p = (testInpPath </>) in
@@ -158,6 +158,41 @@
                     , expParamsMatch = [ ("arch" , Explicit "ppc")
                                        , ("form" , Assumed "refined") ]
                     , associated = [ ("exe", p "looping.ppc.exe")
+                                   ]
+                    }
+                  ]
+                }
+       , Sweets { rootMatchName = "looping-around.c"
+                , rootBaseName = "looping-around"
+                , rootFile = p "looping-around.c"
+                , cubeParams = validParams sugarCube
+                , expected =
+                  [ Expectation
+                    { expectedFile = p "looping-around.expected"
+                    , expParamsMatch = [ ("arch", Assumed "x86")
+                                       , ("form", Assumed "base") ]
+                    , associated = [ ("exe", p "looping-around.x86.exe")
+                                   ]
+                    }
+                  , Expectation
+                    { expectedFile = p "looping-around.expected"
+                    , expParamsMatch = [ ("arch", Assumed "x86")
+                                       , ("form", Assumed "refined")]
+                    , associated = [ ("exe", p "looping-around.x86.exe")
+                                   ]
+                    }
+                  , Expectation
+                    { expectedFile = p "looping-around.ppc.expected"
+                    , expParamsMatch = [ ("arch" , Explicit "ppc")
+                                       , ("form" , Assumed "base") ]
+                    , associated = [ ("exe", p "looping-around.ppc.exe")
+                                   ]
+                    }
+                  , Expectation
+                    { expectedFile = p "looping-around.ppc.expected"
+                    , expParamsMatch = [ ("arch" , Explicit "ppc")
+                                       , ("form" , Assumed "refined") ]
+                    , associated = [ ("exe", p "looping-around.ppc.exe")
                                    ]
                     }
                   ]
diff --git a/test/TestNoAssoc.hs b/test/TestNoAssoc.hs
--- a/test/TestNoAssoc.hs
+++ b/test/TestNoAssoc.hs
@@ -31,9 +31,9 @@
        -- This is simply the number of entries in sample1; if this
        -- fails in means that sample1 has been changed and the other
        -- tests here are likely to need updating.
-       testCase "valid sample" $ 53 @=? length sample1
+       testCase "valid sample" $ 58 @=? length sample1
 
-     , sugarTestEq "correct found count" sugarCube sample1 5 length
+     , sugarTestEq "correct found count" sugarCube sample1 6 length
 
      , testCase "results" $ compareBags "results" sugar1
        $ let p = (testInpPath </>) in
@@ -127,6 +127,37 @@
                     }
                   , Expectation
                     { expectedFile = p "looping.ppc.expected"
+                    , expParamsMatch = [ ("arch" , Explicit "ppc")
+                                       , ("form" , Assumed "refined") ]
+                    , associated = []
+                    }
+                  ]
+                }
+       , Sweets { rootMatchName = "looping-around.c"
+                , rootBaseName = "looping-around"
+                , rootFile = p "looping-around.c"
+                , cubeParams = validParams sugarCube
+                , expected =
+                  [ Expectation
+                    { expectedFile = p "looping-around.expected"
+                    , expParamsMatch = [ ("arch", Assumed "x86")
+                                       , ("form", Assumed "base") ]
+                    , associated = []
+                    }
+                  , Expectation
+                    { expectedFile = p "looping-around.expected"
+                    , expParamsMatch = [ ("arch", Assumed "x86")
+                                       , ("form", Assumed "refined")]
+                    , associated = []
+                    }
+                  , Expectation
+                    { expectedFile = p "looping-around.ppc.expected"
+                    , expParamsMatch = [ ("arch" , Explicit "ppc")
+                                       , ("form" , Assumed "base") ]
+                    , associated = []
+                    }
+                  , Expectation
+                    { expectedFile = p "looping-around.ppc.expected"
                     , expParamsMatch = [ ("arch" , Explicit "ppc")
                                        , ("form" , Assumed "refined") ]
                     , associated = []
diff --git a/test/TestSingleAssoc.hs b/test/TestSingleAssoc.hs
--- a/test/TestSingleAssoc.hs
+++ b/test/TestSingleAssoc.hs
@@ -32,9 +32,9 @@
        -- This is simply the number of entries in sample1; if this
        -- fails in means that sample1 has been changed and the other
        -- tests here are likely to need updating.
-       testCase "valid sample" $ 53 @=? length sample1
+       testCase "valid sample" $ 58 @=? length sample1
 
-     , sugarTestEq "correct found count" sugarCube sample1 5 length
+     , sugarTestEq "correct found count" sugarCube sample1 6 length
 
      , testCase "results" $ compareBags "results" sugar1 $
        let p = (testInpPath </>) in
@@ -142,6 +142,41 @@
                     , expParamsMatch = [ ("arch" , Explicit "ppc")
                                        , ("form" , Assumed "refined") ]
                     , associated = [ ("exe", p "looping.ppc.exe")
+                                   ]
+                    }
+                  ]
+                }
+       , Sweets { rootMatchName = "looping-around.c"
+                , rootBaseName = "looping-around"
+                , rootFile = p "looping-around.c"
+                , cubeParams = validParams sugarCube
+                , expected =
+                  [ Expectation
+                    { expectedFile = p "looping-around.expected"
+                    , expParamsMatch = [ ("arch", Assumed "x86")
+                                       , ("form", Assumed "base") ]
+                    , associated = [ ("exe", p "looping-around.x86.exe")
+                                   ]
+                    }
+                  , Expectation
+                    { expectedFile = p "looping-around.expected"
+                    , expParamsMatch = [ ("arch", Assumed "x86")
+                                       , ("form", Assumed "refined")]
+                    , associated = [ ("exe", p "looping-around.x86.exe")
+                                   ]
+                    }
+                  , Expectation
+                    { expectedFile = p "looping-around.ppc.expected"
+                    , expParamsMatch = [ ("arch" , Explicit "ppc")
+                                       , ("form" , Assumed "base") ]
+                    , associated = [ ("exe", p "looping-around.ppc.exe")
+                                   ]
+                    }
+                  , Expectation
+                    { expectedFile = p "looping-around.ppc.expected"
+                    , expParamsMatch = [ ("arch" , Explicit "ppc")
+                                       , ("form" , Assumed "refined") ]
+                    , associated = [ ("exe", p "looping-around.ppc.exe")
                                    ]
                     }
                   ]
