From dd924c68dda8d39505700782e66e6e8d137885fc Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 18 Dec 2015 09:49:33 -0500 Subject: [PATCH] Test that empty diffs have no hunks. --- test/PatchOutputSpec.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/PatchOutputSpec.hs b/test/PatchOutputSpec.hs index b8b7313b2..20fd81229 100644 --- a/test/PatchOutputSpec.hs +++ b/test/PatchOutputSpec.hs @@ -1,7 +1,14 @@ module PatchOutputSpec where +import Diff +import PatchOutput +import Range +import Syntax +import Control.Monad.Free import Test.Hspec spec :: Spec spec = do - return () + describe "hunks" $ do + it "empty diffs have no hunks" $ + hunks (Free . Annotated (Info (Range 0 0) mempty, Info (Range 0 0) mempty) $ Leaf "") "" "" `shouldBe` []