@@ -19,11 +19,28 @@ tcaseW width name ast =
|
||||
(pure $ Sut.printDatumW width ast)
|
||||
id
|
||||
|
||||
thinWide name x = testGroup name
|
||||
[ tcase (name <> "-wide") x
|
||||
, tcaseW 4 (name <> "-thin") x
|
||||
]
|
||||
|
||||
test_print = testGroup "sexp pretty printer" $
|
||||
[ tcase "null" $ S.List []
|
||||
, let x = S.List [ S.Symbol s | s <- ["가","나","다","라"] ]
|
||||
in testGroup "simple list"
|
||||
[ tcase "flat" x
|
||||
, tcaseW 4 "long" x
|
||||
]
|
||||
, thinWide "simple-list" $
|
||||
S.List [ S.Symbol s | s <- ["가","나","다","라"] ]
|
||||
, thinWide "begin-nonempty" $
|
||||
S.indentWith (S.NSpecial 0) $
|
||||
S.List [ S.adorn S.SynBuiltin $ S.Symbol "begin"
|
||||
, S.Symbol "책을"
|
||||
, S.Symbol "더"
|
||||
, S.Symbol "먹으세요~!"
|
||||
]
|
||||
, thinWide "lambda-nonempty" $
|
||||
S.indentWith (S.NSpecial 1) $
|
||||
S.List [ S.adorn S.SynBuiltin $ S.Symbol "lambda"
|
||||
, S.List [S.Symbol "어간", S.Symbol "어미"]
|
||||
, S.List [S.Symbol "display", S.Symbol "꾸깃"]
|
||||
]
|
||||
, tcase "rainbow" $
|
||||
S.List [S.List [S.List [S.List [S.List []]]]]
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user