mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
18 lines
575 B
Haskell
18 lines
575 B
Haskell
module PatchOutputSpec where
|
|
|
|
import Prologue
|
|
import Data.Functor.Both
|
|
import Info
|
|
import Range
|
|
import Renderer.Patch
|
|
import Source
|
|
import Syntax
|
|
import Category
|
|
import Test.Hspec
|
|
|
|
spec :: Spec
|
|
spec = parallel $
|
|
describe "hunks" $
|
|
it "empty diffs have empty hunks" $
|
|
hunks (free . Free $ pure (Info (Range 0 0) StringLiteral 1 0) :< Leaf "") (both (SourceBlob (fromList "") "abcde" "path2.txt" (Just defaultPlainBlob)) (SourceBlob (fromList "") "xyz" "path2.txt" (Just defaultPlainBlob))) `shouldBe` [Hunk {offset = pure 0, changes = [], trailingContext = []}]
|