-
Notifications
You must be signed in to change notification settings - Fork 725
Open
Labels
Description
I've noticed a small inconsistency in naming in cabal-testsuite. Could we make this change, using Contains universally as the opposite of DoesNotContain rather than DoesContain as the opposite?
- assertFileDoesContain :: MonadIO m => WithCallStack (FilePath -> String -> m ())
+ assertFileContains :: MonadIO m => WithCallStack (FilePath -> String -> m ())The assert.*Contain[s]* functions:
$ grep -o 'assert.*DoesContain.*::' cabal-testsuite/src/Test/Cabal/Prelude.hs
assertFileDoesContain ::
$ grep -o 'assert.*Contains.*::' cabal-testsuite/src/Test/Cabal/Prelude.hs
assertOutputContains ::
assertAnyFileContains ::
assertNoFileContains ::
$ grep -o 'assert.*DoesNotContain.*::' cabal-testsuite/src/Test/Cabal/Prelude.hs
assertOutputDoesNotContain ::
assertFileDoesNotContain ::
Total hits, mostly uses:
$ grep -o 'assert.*DoesContain' ./cabal-testsuite/**/*.hs | wc -l
43
$ grep -o 'assert.*Contains' ./cabal-testsuite/**/*.hs | wc -l
275
$ grep -o 'assert.*DoesNotContain' ./cabal-testsuite/**/*.hs | wc -l
95
The assert.*Match.* functions are consistently named, using Matches and DoesNotMatch as suffix:
$ grep -Po 'assert.*Match.*::' cabal-testsuite/src/Test/Cabal/Prelude.hs
assertOutputMatches ::
assertOutputDoesNotMatch ::
assertGlobMatches ::
assertGlobDoesNotMatch ::
assertGlobMatchesTestDir ::
assertGlobDoesNotMatchTestDir ::
Reactions are currently unavailable