mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
a71f9f05cc
Also applies some HLint advice.
17 lines
558 B
Haskell
17 lines
558 B
Haskell
module PatchOutputSpec where
|
|
|
|
import Prologue
|
|
import Data.Functor.Both
|
|
import Data.Record
|
|
import Range
|
|
import Renderer.Patch
|
|
import Source
|
|
import Syntax
|
|
import Test.Hspec
|
|
|
|
spec :: Spec
|
|
spec = parallel $ do
|
|
describe "hunks" $ do
|
|
it "empty diffs have empty hunks" $
|
|
hunks (wrap $ pure (Range 0 0 .: RNil) :< Leaf ("" :: Text)) (both (SourceBlob (fromList "") "abcde" "path2.txt" (Just defaultPlainBlob)) (SourceBlob (fromList "") "xyz" "path2.txt" (Just defaultPlainBlob))) `shouldBe` [Hunk {offset = pure 0, changes = [], trailingContext = []}]
|