mirror of
https://github.com/ilyakooo0/vty.git
synced 2024-12-03 14:17:18 +03:00
19 lines
463 B
Haskell
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
|
|
]
|
|
|