vty/test/verify_utf8_width.hs
coreyoconnor 7b38759846 use alloca instead of mallocBytes for exception safety
Ignore-this: 1d31bef2e227fefafe8bb4b6f9511e1d

darcs-hash:20090904172928-f0a0d-987b6931294fd33f7825eddc0adf04c81716a4dd.gz
2009-09-04 10:29:28 -07:00

18 lines
449 B
Haskell

module Main 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
main = run_test $ do
verify "sw_is_1_column" sw_is_1_column
verify "dw_is_2_column" dw_is_2_column
return ()