NorfairKing / sydtest

A modern testing framework for Haskell with good defaults and advanced testing features.
115 stars 25 forks source link

`shouldStartWith` uses `isInfixOf` instead of `isPrefixOf` #31

Closed joel-bach closed 2 years ago

joel-bach commented 2 years ago

I just noticed that the following assertion does not fail:

"test" `shouldStartWith` "es"

After looking at the implementation here https://github.com/NorfairKing/sydtest/blob/b6422a1940372e4670fa628f8d62f0ba6519d867/sydtest/src/Test/Syd/Expectation.hs#L70 it does seem like this is a copy-paste error as it uses isInfixOf and even has the error description "has infix" instead of "has prefix" or something like it.

Should I create a PR or am I missing something?

NorfairKing commented 2 years ago

Whoops! Jup, a PR would be great!