vty/test/VerifyUtf8Width.hs
2012-10-15 20:50:58 -07:00

19 lines
463 B
Haskell

module VerifyUtf8Width where
import Verify
import Graphics.Vty.Attributes
import Graphics.Vty.Picture
sw_is_1_column :: SingleColumnChar -> Bool
sw_is_1_column (SingleColumnChar c) = image_width (char def_attr c) == 1
dw_is_2_column :: DoubleColumnChar -> Bool
dw_is_2_column (DoubleColumnChar c) = image_width (char def_attr c) == 2
tests :: IO [Test]
tests = return
[ verify "sw_is_1_column" sw_is_1_column
, verify "dw_is_2_column" dw_is_2_column
]