tasty-sugar-2.0.0.0: Tests defined by Search Using Golden Answer References
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Tasty.Sugar.Candidates

Synopsis

Documentation

candidateToPath :: CandidateFile -> FilePath Source #

This converts a CandidatFile into a regular FilePath for access

makeCandidate :: CUBE -> FilePath -> [String] -> FilePath -> CandidateFile Source #

Create a CandidateFile entry for this top directory, sub-paths, and filename. In addition, any Explicit parameters with known values that appear in the filename are captured. Note that:

  • There may be multiple possible matches for a single parameter (e.g. the value is repeated in the name or path, or an undefind value (Nothing) parameter could have multiple possible values extracted from the filename.
  • File name matches are preferred over sub-path matches and will occlude the latter.
  • All possible filename portions and sub-paths will be suggested for non-value
  • parameters (validParams with Nothing).

candidateMatchPrefix :: Separators -> CandidateFile -> CandidateFile -> Bool Source #

Determines if the second CandidateFile argument matches the prefix of the first CandidateFile, up to any separator (if applicable). This can be used to match possible expected files against the current root file, or possible associated files against the current expected file.