mirror of
https://github.com/github/semantic.git
synced 2024-12-25 16:02:43 +03:00
e3ace6408c
# Conflicts: # test/AlignmentSpec.hs # test/PatchOutputSpec.hs
18 lines
596 B
Haskell
18 lines
596 B
Haskell
module PatchOutputSpec where
|
|
|
|
import Control.Monad.Free
|
|
import Data.Functor.Both
|
|
import Diff
|
|
import Info
|
|
import Range
|
|
import Renderer.Patch
|
|
import Source
|
|
import Syntax
|
|
import Test.Hspec
|
|
|
|
spec :: Spec
|
|
spec = parallel $
|
|
describe "hunks" $
|
|
it "empty diffs have empty hunks" $
|
|
hunks (Free . Annotated (pure (Info (Range 0 0) mempty 1)) $ Leaf "" :: Diff String Info) (both (SourceBlob (fromList "") "abcde" "path2.txt" (Just defaultPlainBlob)) (SourceBlob (fromList "") "xyz" "path2.txt" (Just defaultPlainBlob))) `shouldBe` [Hunk {offset = pure 0, changes = [], trailingContext = []}]
|