1
1
mirror of https://github.com/github/semantic.git synced 2025-01-02 20:41:38 +03:00

Use either path in output

This commit is contained in:
joshvera 2016-08-10 11:00:40 -04:00
parent dfbc5e1867
commit 1c1938080c

View File

@ -39,7 +39,7 @@ spec = parallel $ do
paths <- runIO $ examples directory
let tests = correctTests =<< paths
traverse_ (\ (formatName, renderer, paths, output) ->
it (maybe "/dev/null" normalizeName (fst paths) ++ " (" ++ formatName ++ ")") $ testDiff renderer paths output matcher) tests
it (maybe "/dev/null" normalizeName (uncurry (<|>) (runJoin paths)) ++ " (" ++ formatName ++ ")") $ testDiff renderer paths output matcher) tests
correctTests paths@(_, _, Nothing, Nothing, Nothing) = testsForPaths paths
correctTests paths = filter (\(_, _, _, output) -> isJust output) $ testsForPaths paths