on master help sign in
fixup examples that use outputForCurrentTerminal
commit2c756c11585faaabdbc9f547440a389a732998d1 authorCorey O'Connor <coreyoconnor@gmail.com> dateSat 31 May 2014, 18:12 (12 years ago) parent4aceef7
1 file changed+18−18
test/interactive_terminal_test.hs+18−18
test/interactive_terminal_test.hs+18−18
@@ -77,7 +77,7 @@ with the test_results.list file pasted into the issue. A suitable summary is:
7777 ( \ (_ :: SomeException) -> return (envName, "") )
7878 )
7979 [ "TERM", "COLORTERM", "LANG", "TERM_PROGRAM", "XTERM_VERSION" ]
80− t <- outputForCurrentTerminal
80+ t <- outputForCurrentTerminal def
8181 let resultsTxt = show envAttributes ++ "\n"
8282 ++ terminalID t ++ "\n"
8383 ++ show results ++ "\n"
@@ -188,7 +188,7 @@ reserveOutputTest = Test
188188 { testName = "Initialize and reserve terminal output then restore previous state."
189189 , testID = "reserveOutputTest"
190190 , testAction = do
191− t <- outputForCurrentTerminal
191+ t <- outputForCurrentTerminal def
192192 reserveDisplay t
193193 putStrLn "Line 1"
194194 putStrLn "Line 2"
@@ -221,7 +221,7 @@ displayBoundsTest0 = Test
221221 { testName = "Verify display bounds are correct test 0: Using spaces."
222222 , testID = "displayBoundsTest0"
223223 , testAction = do
224− t <- outputForCurrentTerminal
224+ t <- outputForCurrentTerminal def
225225 reserveDisplay t
226226 (w,h) <- displayBounds t
227227 let row0 = replicate (fromEnum w) 'X' ++ "\n"
@@ -242,7 +242,7 @@ displayBoundsTest1 = Test
242242 { testName = "Verify display bounds are correct test 0: Using cursor movement."
243243 , testID = "displayBoundsTest1"
244244 , testAction = do
245− t <- outputForCurrentTerminal
245+ t <- outputForCurrentTerminal def
246246 reserveDisplay t
247247 (w,h) <- displayBounds t
248248 setCursorPos t 0 0
@@ -271,7 +271,7 @@ displayBoundsTest2 = Test
271271 { testName = "Verify display bounds are correct test 0: Using Image ops."
272272 , testID = "displayBoundsTest2"
273273 , testAction = do
274− t <- outputForCurrentTerminal
274+ t <- outputForCurrentTerminal def
275275 reserveDisplay t
276276 bounds@(w,h) <- displayBounds t
277277 let firstRow = horizCat $ replicate (fromEnum w) (char defAttr 'X')
@@ -294,7 +294,7 @@ displayBoundsTest3 = Test
294294 { testName = "Verify display bounds are correct test 0: Hide cursor; Set cursor pos."
295295 , testID = "displayBoundsTest3"
296296 , testAction = do
297− t <- outputForCurrentTerminal
297+ t <- outputForCurrentTerminal def
298298 reserveDisplay t
299299 (w,h) <- displayBounds t
300300 hideCursor t
@@ -406,7 +406,7 @@ unicodeSingleWidth0 = Test
406406 { testName = "Verify terminal can display unicode single-width characters. (Direct UTF-8)"
407407 , testID = "unicodeSingleWidth0"
408408 , testAction = do
409− t <- outputForCurrentTerminal
409+ t <- outputForCurrentTerminal def
410410 reserveDisplay t
411411 hideCursor t
412412 withArrayLen (concat utf8Txt0) (flip $ hPutBuf stdout)
@@ -425,7 +425,7 @@ unicodeSingleWidth1 = Test
425425 { testName = "Verify terminal can display unicode single-width characters. (Image ops)"
426426 , testID = "unicodeSingleWidth1"
427427 , testAction = do
428− t <- outputForCurrentTerminal
428+ t <- outputForCurrentTerminal def
429429 reserveDisplay t
430430 let pic = picForImage image
431431 image = line0 <-> line1
@@ -488,7 +488,7 @@ unicodeDoubleWidth0 = Test
488488 { testName = "Verify terminal can display unicode double-width characters. (Direct UTF-8)"
489489 , testID = "unicodeDoubleWidth0"
490490 , testAction = do
491− t <- outputForCurrentTerminal
491+ t <- outputForCurrentTerminal def
492492 reserveDisplay t
493493 hideCursor t
494494 withArrayLen (concat utf8Txt1) (flip $ hPutBuf stdout)
@@ -507,7 +507,7 @@ unicodeDoubleWidth1 = Test
507507 { testName = "Verify terminal can display unicode double-width characters. (Image ops)"
508508 , testID = "unicodeDoubleWidth1"
509509 , testAction = do
510− t <- outputForCurrentTerminal
510+ t <- outputForCurrentTerminal def
511511 reserveDisplay t
512512 let pic = picForImage image
513513 image = line0 <-> line1
@@ -561,7 +561,7 @@ attributesTest0 = Test
561561 { testName = "Character attributes: foreground colors."
562562 , testID = "attributesTest0"
563563 , testAction = do
564− t <- outputForCurrentTerminal
564+ t <- outputForCurrentTerminal def
565565 reserveDisplay t
566566 let pic = picForImage image
567567 image = border <|> column0 <|> border <|> column1 <|> border
@@ -607,7 +607,7 @@ attributesTest1 = Test
607607 { testName = "Character attributes: background colors."
608608 , testID = "attributesTest1"
609609 , testAction = do
610− t <- outputForCurrentTerminal
610+ t <- outputForCurrentTerminal def
611611 reserveDisplay t
612612 let pic = picForImage image
613613 image = border <|> column0 <|> border <|> column1 <|> border
@@ -662,7 +662,7 @@ attributesTest2 = Test
662662 { testName = "Character attributes: Vivid foreground colors."
663663 , testID = "attributesTest2"
664664 , testAction = do
665− t <- outputForCurrentTerminal
665+ t <- outputForCurrentTerminal def
666666 reserveDisplay t
667667 let pic = picForImage image
668668 image = horizCat [border, column0, border, column1, border, column2, border]
@@ -721,7 +721,7 @@ attributesTest3 = Test
721721 { testName = "Character attributes: Vivid background colors."
722722 , testID = "attributesTest3"
723723 , testAction = do
724− t <- outputForCurrentTerminal
724+ t <- outputForCurrentTerminal def
725725 reserveDisplay t
726726 let pic = picForImage image
727727 image = horizCat [border, column0, border, column1, border, column2, border]
@@ -799,7 +799,7 @@ attributesTest4 = Test
799799 { testName = "Character attributes: Bold; Blink; Underline."
800800 , testID = "attributesTest4"
801801 , testAction = do
802− t <- outputForCurrentTerminal
802+ t <- outputForCurrentTerminal def
803803 reserveDisplay t
804804 let pic = picForImage image
805805 image = horizCat [border, column0, border, column1, border]
@@ -851,7 +851,7 @@ attributesTest5 = Test
851851 { testName = "Character attributes: 240 color palette"
852852 , testID = "attributesTest5"
853853 , testAction = do
854− t <- outputForCurrentTerminal
854+ t <- outputForCurrentTerminal def
855855 reserveDisplay t
856856 let pic = picForImage image
857857 image = vertCat $ map horizCat $ splitColorImages colorImages
@@ -962,7 +962,7 @@ outputImageAndWait image = do
962962
963963outputPicAndWait :: Picture -> IO ()
964964outputPicAndWait pic = do
965− t <- outputForCurrentTerminal
965+ t <- outputForCurrentTerminal def
966966 reserveDisplay t
967967 d <- displayBounds t >>= displayContext t
968968 outputPicture d pic
@@ -1145,7 +1145,7 @@ layer1 = Test
11451145
11461146cheesyAnim0 :: Image -> [Image] -> IO ()
11471147cheesyAnim0 i background = do
1148− t <- outputForCurrentTerminal
1148+ t <- outputForCurrentTerminal def
11491149 reserveDisplay t
11501150 bounds <- displayBounds t
11511151 d <- displayContext t bounds