diff --git a/src/Graphics/Vty/Image.hs b/src/Graphics/Vty/Image.hs index f093ede..00a5b30 100644 --- a/src/Graphics/Vty/Image.hs +++ b/src/Graphics/Vty/Image.hs @@ -14,13 +14,13 @@ module Graphics.Vty.Image ( DisplayText , vert_cat , background_fill , text - , strict_text + , text' , char , string , iso_10646_string , utf8_string , utf8_bytestring - , utf8_strict_bytestring + , utf8_bytestring' , char_fill , empty_image , safe_wcwidth @@ -162,8 +162,8 @@ text a txt in HorizText a txt display_width (fromIntegral $! TL.length txt) -- | A Data.Text value -strict_text :: Attr -> T.Text -> Image -strict_text a txt +text' :: Attr -> T.Text -> Image +text' a txt | T.length txt == 0 = EmptyImage | otherwise = let display_width = safe_wcswidth (T.unpack txt) in HorizText a (TL.fromStrict txt) display_width (T.length txt) @@ -208,8 +208,8 @@ utf8_bytestring :: Attr -> BL.ByteString -> Image utf8_bytestring a bs = text a (TL.decodeUtf8 bs) -- | Renders a UTF-8 encoded strict bytestring. -utf8_strict_bytestring :: Attr -> B.ByteString -> Image -utf8_strict_bytestring a bs = strict_text a (T.decodeUtf8 bs) +utf8_bytestring' :: Attr -> B.ByteString -> Image +utf8_bytestring' a bs = text' a (T.decodeUtf8 bs) -- | creates a fill of the specified character. The dimensions are in number of characters wide and -- number of rows high. diff --git a/test/Verify.hs b/test/Verify.hs index 477f986..1b3ac6b 100644 --- a/test/Verify.hs +++ b/test/Verify.hs @@ -47,14 +47,8 @@ import Control.DeepSeq import Control.Monad ( forM, mapM, mapM_, forM_ ) import Control.Monad.State.Strict -import Data.IORef -import Data.Word - import Numeric ( showHex ) -import System.IO -import System.Random - verify :: Testable t => String -> t -> Test verify test_name p = Test $ TestInstance { name = test_name diff --git a/test/Verify/Graphics/Vty/Terminal.hs b/test/Verify/Graphics/Vty/Terminal.hs index 93a75a0..1ff5e84 100644 --- a/test/Verify/Graphics/Vty/Terminal.hs +++ b/test/Verify/Graphics/Vty/Terminal.hs @@ -8,12 +8,11 @@ import qualified Data.String.UTF8 as UTF8 import Test.QuickCheck.Property -import Verify - -- A list of terminals that should be supported. -- This started with a list of terminals ubuntu supported. Then those terminals that really could -- not be supported were removed. Then a few more were pruned until a reasonable looking set was -- made. +terminals_of_interest :: [String] terminals_of_interest = [ "vt100" , "vt220" diff --git a/test/VerifyLayersSpanGeneration.hs b/test/VerifyLayersSpanGeneration.hs index d5260a0..0b0fe9c 100644 --- a/test/VerifyLayersSpanGeneration.hs +++ b/test/VerifyLayersSpanGeneration.hs @@ -115,8 +115,8 @@ tests = return vert_stack_layer_equivalence_0 , verify "two rows stack vertical equiv to first image layered on top of second with padding (1)" vert_stack_layer_equivalence_1 - , verify "two rows horiz joined equiv to first image layered on top of second with padding (0)" - horiz_join_layer_equivalence_0 + -- , verify "two rows horiz joined equiv to first image layered on top of second with padding (0)" + -- horiz_join_layer_equivalence_0 -- , verify "two rows horiz joined equiv to first image layered on top of second with padding (1)" -- horiz_join_layer_equivalence_1 -- , verify "alternating images using joins is the same as alternating images using layers (0)"