Bugfix for bug 11632: `readLitChar` should consume null characters
[ghc.git] / libraries / base / tests / readLitChar.hs
1 module Main (main)
2 where
3
4 import Data.Char (digitToInt, lexLitChar, readLitChar)
5
6 main :: IO ()
7 main =
8 do putStrLn (show $ readLitChar "A")
9 putStrLn (show $ readLitChar "'A'")
10 putStrLn (show $ lexLitChar "A")
11 putStrLn (show $ lexLitChar "'A'")
12 putStrLn (show $ lexLitChar "\\243\\&1")
13 putStrLn (show $ lexLitChar "a\\&1")
14 putStrLn (show $ lexLitChar "a\\&\\&1")
15 putStrLn (show $ lexLitChar "a\\&\\&")