Commit ff4939ef authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Remove the tests/lib/PrettyPrint tests; part of #1161

I'll send them to pretty upstream.
parent 3ff30500
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
module Main where
import Text.PrettyPrint.HughesPJ
xs :: [Doc]
xs = [text "hello",
nest 10 (text "world")]
d1 :: Doc
d1 = vcat xs
d2 :: Doc
d2 = foldr ($$) empty xs
d3 :: Doc
d3 = foldr ($+$) empty xs
main :: IO ()
main = do print d1
print d2
print d3
test('pp1', compose(expect_broken(1062), only_ways(['normal'])), compile_and_run, [''])
test('T3911', normal, compile_and_run, [''])
-- This code used to print an infinite string, by calling 'spaces'
-- with a negative argument. There's a patch in the library now,
-- which makes 'spaces' do something sensible when called with a negative
-- argument, but it really should not happen at all.
module Main where
import Text.PrettyPrint.HughesPJ
ncat x y = nest 4 $ cat [ x, y ]
d1 = foldl1 ncat $ take 50 $ repeat $ char 'a'
d2 = parens $ sep [ d1, text "+" , d1 ]
main = print d2
This output is not what is expected, becuase the
test "works" now, by virtue of a hack in HughesPJ.spaces.
I'm leaving this strange output here to remind us to look
at the root cause of the problem. Sometime.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment