~jaro/balkon

d750f2318a6c2c1607a47fc5af58d33ba01bea94 — Jaro 1 year, 9 months ago fc6196d
Ensure paragraph rect is unaffected by spans.
1 files changed, 18 insertions(+), 0 deletions(-)

M test/Data/Text/ParagraphLayoutSpec.hs
M test/Data/Text/ParagraphLayoutSpec.hs => test/Data/Text/ParagraphLayoutSpec.hs +18 -0
@@ 94,6 94,15 @@ spec = do
                        (opts font)
                        { paragraphMaxWidth = 20000 }
                result `shouldBeGolden` "spannedArabicFiller20em"
            it "spans do not reposition filler text at 20em" $ \font -> do
                let
                    withoutSpans = layoutPlain $ arabicFillerParagraph $
                        (opts font)
                        { paragraphMaxWidth = 20000 }
                    withSpans = layoutPlain $ spannedArabicFillerParagraph $
                        (opts font)
                        { paragraphMaxWidth = 20000 }
                paragraphRect withoutSpans `shouldBe` paragraphRect withSpans
        describe "with Latin font" $ before loadUbuntuRegular $ do
            it "handles input with no spans" $ \font -> do
                let result = layoutPlain $ emptyParagraph $ opts font


@@ 149,6 158,15 @@ spec = do
                        (opts font)
                        { paragraphMaxWidth = 20000 }
                result `shouldBeGolden` "spannedLoremIpsum20em"
            it "spans do not reposition lorem ipsum at 20em" $ \font -> do
                let
                    withoutSpans = layoutPlain $ loremIpsumParagraph $
                        (opts font)
                        { paragraphMaxWidth = 20000 }
                    withSpans = layoutPlain $ spannedLoremIpsumParagraph $
                        (opts font)
                        { paragraphMaxWidth = 20000 }
                paragraphRect withoutSpans `shouldBe` paragraphRect withSpans
            it "wraps mixed-script words correctly" $ \font -> do
                let
                    result = layoutPlain $ mixedScriptWordsParagraph $