on master help sign in
rename strict_text to text'
commitb6caadc7e7213da9e6e89909a9be49aceae02ff8 authorCorey O'Connor <coreyoconnor@gmail.com> dateFri 25 Oct 2013, 22:28 (13 years ago) parent562cc50
4 files changed+9−16
src/Graphics/Vty/Image.hs+6−6 test/Verify.hs−6 test/Verify/Graphics/Vty/Terminal.hs+1−2 test/VerifyLayersSpanGeneration.hs+2−2
src/Graphics/Vty/Image.hs+6−6
@@ -14,13 +14,13 @@ module Graphics.Vty.Image ( DisplayText
1414 , vert_cat
1515 , background_fill
1616 , text
17− , strict_text
17+ , text'
1818 , char
1919 , string
2020 , iso_10646_string
2121 , utf8_string
2222 , utf8_bytestring
23− , utf8_strict_bytestring
23+ , utf8_bytestring'
2424 , char_fill
2525 , empty_image
2626 , safe_wcwidth
@@ -162,8 +162,8 @@ text a txt
162162 in HorizText a txt display_width (fromIntegral $! TL.length txt)
163163
164164-- | A Data.Text value
165−strict_text :: Attr -> T.Text -> Image
166−strict_text a txt
165+text' :: Attr -> T.Text -> Image
166+text' a txt
167167 | T.length txt == 0 = EmptyImage
168168 | otherwise = let display_width = safe_wcswidth (T.unpack txt)
169169 in HorizText a (TL.fromStrict txt) display_width (T.length txt)
@@ -208,8 +208,8 @@ utf8_bytestring :: Attr -> BL.ByteString -> Image
208208utf8_bytestring a bs = text a (TL.decodeUtf8 bs)
209209
210210-- | Renders a UTF-8 encoded strict bytestring.
211−utf8_strict_bytestring :: Attr -> B.ByteString -> Image
212−utf8_strict_bytestring a bs = strict_text a (T.decodeUtf8 bs)
211+utf8_bytestring' :: Attr -> B.ByteString -> Image
212+utf8_bytestring' a bs = text' a (T.decodeUtf8 bs)
213213
214214-- | creates a fill of the specified character. The dimensions are in number of characters wide and
215215-- number of rows high.
test/Verify.hs−6
@@ -47,14 +47,8 @@ import Control.DeepSeq
4747import Control.Monad ( forM, mapM, mapM_, forM_ )
4848import Control.Monad.State.Strict
4949
50−import Data.IORef
51−import Data.Word
52−
5350import Numeric ( showHex )
5451
55−import System.IO
56−import System.Random
57−
5852verify :: Testable t => String -> t -> Test
5953verify test_name p = Test $ TestInstance
6054 { name = test_name
test/Verify/Graphics/Vty/Terminal.hs+1−2
@@ -8,12 +8,11 @@ import qualified Data.String.UTF8 as UTF8
88
99import Test.QuickCheck.Property
1010
11−import Verify
12−
1311-- A list of terminals that should be supported.
1412-- This started with a list of terminals ubuntu supported. Then those terminals that really could
1513-- not be supported were removed. Then a few more were pruned until a reasonable looking set was
1614-- made.
15+terminals_of_interest :: [String]
1716terminals_of_interest =
1817 [ "vt100"
1918 , "vt220"
test/VerifyLayersSpanGeneration.hs+2−2
@@ -115,8 +115,8 @@ tests = return
115115 vert_stack_layer_equivalence_0
116116 , verify "two rows stack vertical equiv to first image layered on top of second with padding (1)"
117117 vert_stack_layer_equivalence_1
118− , verify "two rows horiz joined equiv to first image layered on top of second with padding (0)"
119− horiz_join_layer_equivalence_0
118+ -- , verify "two rows horiz joined equiv to first image layered on top of second with padding (0)"
119+ -- horiz_join_layer_equivalence_0
120120 -- , verify "two rows horiz joined equiv to first image layered on top of second with padding (1)"
121121 -- horiz_join_layer_equivalence_1
122122 -- , verify "alternating images using joins is the same as alternating images using layers (0)"