mirror of
https://github.com/github/semantic.git
synced 2024-11-24 00:42:33 +03:00
Rename Renderer.PatchOutput to Renderer.Patch.
This commit is contained in:
parent
c710b3c713
commit
f44455c372
@ -10,7 +10,7 @@ import System.Directory
|
||||
import System.FilePath
|
||||
import qualified System.IO as IO
|
||||
import qualified Data.Text.Lazy.IO as TextIO
|
||||
import qualified Renderer.PatchOutput as PO
|
||||
import qualified Renderer.Patch as P
|
||||
import Rainbow
|
||||
|
||||
-- | The available types of diff rendering.
|
||||
@ -35,4 +35,4 @@ printDiff parser arguments sources = case format arguments of
|
||||
then path </> (takeFileName outputPath -<.> ".html")
|
||||
else path
|
||||
IO.withFile outputPath IO.WriteMode (flip TextIO.hPutStr rendered)
|
||||
Patch -> putStr =<< diffFiles parser PO.patch sources
|
||||
Patch -> putStr =<< diffFiles parser P.patch sources
|
||||
|
@ -24,7 +24,7 @@ library
|
||||
, Row
|
||||
, Data.OrderedMap
|
||||
, Patch
|
||||
, Renderer.PatchOutput
|
||||
, Renderer.Patch
|
||||
, SES
|
||||
, Category
|
||||
, Term
|
||||
|
@ -1,4 +1,4 @@
|
||||
module Renderer.PatchOutput (
|
||||
module Renderer.Patch (
|
||||
patch,
|
||||
hunks
|
||||
) where
|
@ -1,7 +1,7 @@
|
||||
module CorpusSpec where
|
||||
|
||||
import Diffing
|
||||
import qualified Renderer.PatchOutput as PO
|
||||
import qualified Renderer.Patch as P
|
||||
import Renderer
|
||||
import Split
|
||||
import Unified
|
||||
@ -43,7 +43,7 @@ spec = parallel $ do
|
||||
correctTests paths@(_, _, Nothing, Nothing, Nothing) = testsForPaths paths
|
||||
correctTests paths = List.filter (\(_, _, _, _, output) -> isJust output) $ testsForPaths paths
|
||||
testsForPaths :: (FilePath, FilePath, Maybe FilePath, Maybe FilePath, Maybe FilePath) -> [(String, Renderer a String, FilePath, FilePath, Maybe FilePath)]
|
||||
testsForPaths (a, b, patch, split, unified) = [ ("patch", PO.patch, a, b, patch), ("split", testSplit, a, b, split), ("unified", testUnified, a, b, unified) ]
|
||||
testsForPaths (a, b, patch, split, unified) = [ ("patch", P.patch, a, b, patch), ("split", testSplit, a, b, split), ("unified", testUnified, a, b, unified) ]
|
||||
testSplit :: Renderer a String
|
||||
testSplit diff sources = TL.unpack $ Split.split diff sources
|
||||
testUnified :: Renderer a String
|
||||
|
@ -1,7 +1,7 @@
|
||||
module PatchOutputSpec where
|
||||
|
||||
import Diff
|
||||
import Renderer.PatchOutput
|
||||
import Renderer.Patch
|
||||
import Range
|
||||
import Source
|
||||
import Syntax
|
||||
|
Loading…
Reference in New Issue
Block a user