       [ utf8 "xαβγy" ]
        [ prompt' 0, utf8 "xαβγy" ]
    , "line input wide movement" ~: utf8Test i
        [ utf8 wideChar, raw [1], raw [5] ]
        [ prompt' 0, utf8 wideChar
        , utf8 (T.replicate 60 "\b")
        , utf8 wideChar
        ]
    , "line char input" ~: utf8Test (setCharInput i)
        [utf8 "xαβ"]
        [ prompt' 0, utf8 "x" <> nl <> output 0 (utf8 "x")
          <> prompt' 1 <> utf8 "α" <> nl <> output 1 (utf8 "α")
          <> prompt' 2 <> utf8 "β" <> nl <> output 2 (utf8 "β")
          <> prompt' 3
        ]
    ]
  where
    wideChar = T.concat $ replicate 10 $ "안기영"

-------------
-- Building blocks for expected input/output

smkx,rmkx :: B.ByteString
smkx = utf8 "\ESC[?1h\ESC="
rmkx = utf8 "\ESC[?1l\ESC>"

prompt, prompt' :: Int -> B.
dumbTests :: Invocation -> Test
dumbTests i = "dumb term" ~:
    [ "line input" ~: utf8Test i
        [ utf8 "xαβγy" ]
        [ prompt' 0, utf8 "xαβγy" ]
    , "line input wide movement" ~: utf8Test i
        [ utf8 wideChar, raw [1], raw [5] ]
        [ prompt' 0, utf8 wideChar
        , utf8 (T.replicate 60 "\b")
        , utf8 wideChar
        ]
    , "line char input" ~: utf8Test (setCharInput i)
        [utf8 "xαβ"]
        [ prompt' 0, utf8 "x" <> nl <> output 0 (utf8 "x")
          <> prompt' 1 <> utf8 "α" <> nl <> output 1 (utf8 "α")
          <> prompt' 2 <> utf8 "β" <> nl <> output 2 (utf8 "β")
          <> prompt' 3
        ]
    ]
  where
    wideChar = T.concat $ replicate 10 $ "안기영"

-------------
-- Building blocks for expected input/output
dumbTests i = "dumb term" ~:
    [ "line input" ~: utf8Test i
        [ utf8 "xαβγy" ]
        [ prompt' 0, utf8 "xαβγy" ]
    , "line input wide movement" ~: utf8Test i
        [ utf8 wideChar, raw [1], raw [5] ]
        [ prompt' 0, utf8 wideChar
        , utf8 (T.replicate 60 "\b")
        , utf8 wideChar
        ]
    , "line char input" ~: utf8Test (setCharInput i)
        [utf8 "xαβ"]
        [ prompt' 0, utf8 "x" <> nl <> output 0 (utf8 "x")
          <> prompt' 1 <> utf8 "α" <> nl <> output 1 (utf8 "α")
          <> prompt' 2 <> utf8 "β" <> nl <> output 2 (utf8 "β")
          <> prompt' 3
        ]
    ]
  where
    wideChar = T.concat $ replicate 10 $ "안기영"

-------------
-- Building blocks for expected input/output