module UI.WidgetSpec where import qualified Data.Text as T import Test.Hspec import "spade" Common import Test.Hspec.Hedgehog import Test.Common spec :: Spec spec = modifyMaxSuccess (const 10) $ describe "StyledText insertion behavior" $ it "insertion works as expected" $ hedgehog $ do e <- forAll (list (linear 1 100) (getGen @StyledText)) let i = Plain (T.replicate (stTotalLength e - 5) " ") let inserted = stInsert e 0 i (stTotalLength e === stTotalLength inserted)