incorrect input" ~:
    [ utf8Test i [ utf8 "x" <> raw [206] ]  -- needs one more byte
        -- non-legacy encoder ignores the "206" since it's still waiting
        -- for more input.
        [ prompt 0, utf8 "x" <> whenLegacy err ]
    , utf8Test i [ raw [206] <> utf8 "x" ]
        -- 'x' is not valid after '\206', so both the legacy and
        -- non-legacy encoders should handle the "x" correctly.
        [ prompt 0, err <> utf8 "x"]
    , utf8Test i [ raw [236,149] <> utf8 "x" ] -- needs one more byte
        [prompt 0, err <> err <> utf8 "x"]
    ]

historyTests :: Invocation -> Test
historyTests i =  "h
incorrectInput :: Invocation -> Test
incorrectInput i = "incorrect input" ~:
    [ utf8Test i [ utf8 "x" <> raw [206] ]  -- needs one more byte
        -- non-legacy encoder ignores the "206" since it's still waiting
        -- for more input.
        [ prompt 0, utf8 "x" <> whenLegacy err ]
    , utf8Test i [ raw [206] <> utf8 "x" ]
        -- 'x' is not valid after '\206', so both the legacy and
        -- non-legacy encoders should handle the "x" correctly.
        [ prompt 0, err <> utf8 "x"]
    , utf8Test i [ raw [236,149] <> utf8 "x" ] -- needs one more byte
        [prompt 0, err <> err <> utf8 "x"]
    ]
incorrectInput i = "incorrect input" ~:
    [ utf8Test i [ utf8 "x" <> raw [206] ]  -- needs one more byte
        -- non-legacy encoder ignores the "206" since it's still waiting
        -- for more input.
        [ prompt 0, utf8 "x" <> whenLegacy err ]
    , utf8Test i [ raw [206] <> utf8 "x" ]
        -- 'x' is not valid after '\206', so both the legacy and
        -- non-legacy encoders should handle the "x" correctly.
        [ prompt 0, err <> utf8 "x"]
    , utf8Test i [ raw [236,149] <> utf8 "x" ] -- needs one more byte
        [prompt 0, err <> err <> utf8 "x"]
    ]