From 4581edf44a98c61335ee92eb08f9e0b46a49c16c Mon Sep 17 00:00:00 2001 From: Jaro Date: Wed, 15 Mar 2023 15:53:34 +0100 Subject: [PATCH] Reduce test dependencies on fonts. --- .../Text/ParagraphLayout/Internal/RunSpec.hs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/test/Data/Text/ParagraphLayout/Internal/RunSpec.hs b/test/Data/Text/ParagraphLayout/Internal/RunSpec.hs index 58f5072..784e938 100644 --- a/test/Data/Text/ParagraphLayout/Internal/RunSpec.hs +++ b/test/Data/Text/ParagraphLayout/Internal/RunSpec.hs @@ -1,21 +1,20 @@ module Data.Text.ParagraphLayout.Internal.RunSpec (spec) where import Data.Text (pack) -import Data.Text.Glyphize (Direction(..)) +import Data.Text.Glyphize (Direction(..), emptyFont) import Test.Hspec -import Data.Text.ParagraphLayout.FontLoader import Data.Text.ParagraphLayout.Internal.ResolvedSpan import Data.Text.ParagraphLayout.Internal.Run import Data.Text.ParagraphLayout.SpanData spec :: Spec spec = do - describe "spanToRuns" $ before loadUbuntuRegular $ do - it "handles span with no text" $ \font -> do - spanToRuns (emptySpan font) `shouldBe` [] - it "handles Czech hello" $ \font -> do - let inputSpan = czechHello font + describe "spanToRuns" $ do + it "handles span with no text" $ do + spanToRuns (emptySpan emptyFont) `shouldBe` [] + it "handles Czech hello" $ do + let inputSpan = czechHello emptyFont let runs = spanToRuns inputSpan runs `shouldBe` [ Run @@ -25,8 +24,8 @@ spec = do , runScript = Just "Latn" } ] - it "handles Serbian with mixed script" $ \font -> do - let inputSpan = serbianMixedScript font + it "handles Serbian with mixed script" $ do + let inputSpan = serbianMixedScript emptyFont let runs = spanToRuns inputSpan runs `shouldBe` [ Run -- 2.30.2