1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 02:58:36 +03:00
semantic/test/PatchOutputSpec.hs
2016-02-28 21:10:56 -05:00

17 lines
470 B
Haskell

module PatchOutputSpec where
import Data.Bifunctor.Join
import Diff
import Renderer.Patch
import Range
import Source
import Syntax
import Control.Monad.Free
import Test.Hspec
spec :: Spec
spec = parallel $
describe "hunks" $
it "empty diffs have no hunks" $
hunks (Free . Annotated (Info (Range 0 0) mempty, Info (Range 0 0) mempty) $ Leaf "") (Join (SourceBlob (fromList "") "abcde" "path2.txt", SourceBlob (fromList "") "xyz" "path2.txt")) `shouldBe` []