@@ -19,7 +19,7 @@ import Data.Monoid
1919import Data.String.QQ
2020import Data.Word
2121
22−import Foreign.Marshal.Array
22+import Foreign.Marshal.Array
2323
2424import qualified System.Environment as Env
2525
@@ -74,12 +74,12 @@ with the test_results.list file pasted into the issue. A suitable summary is:
7474|]
7575 waitForReturn
7676 results <- doTestMenu 1
77− envAttributes <- mapM ( \envName -> Control.Exception.catch ( Env.getEnv envName >>= return . (,) envName )
78− ( \ (_ :: SomeException) -> return (envName, "") )
79− )
77+ envAttributes <- mapM ( \envName -> Control.Exception.catch ( Env.getEnv envName >>= return . (,) envName )
78+ ( \ (_ :: SomeException) -> return (envName, "") )
79+ )
8080 [ "TERM", "COLORTERM", "LANG", "TERM_PROGRAM", "XTERM_VERSION" ]
8181 t <- standardIOConfig >>= outputForConfig
82− let resultsTxt = show envAttributes ++ "\n"
82+ let resultsTxt = show envAttributes ++ "\n"
8383 ++ terminalID t ++ "\n"
8484 ++ show results ++ "\n"
8585 releaseTerminal t
@@ -94,7 +94,7 @@ testMenu :: [(String, Test)]
9494testMenu = zip (map show [1..]) allTests
9595
9696doTestMenu :: Int -> IO [(String, Bool)]
97−doTestMenu nextID
97+doTestMenu nextID
9898 | nextID > length allTests = do
9999 putStrLn $ "Done! Please email the " ++ outputFilePath ++ " file to coreyoconnor@gmail.com"
100100 return []
@@ -108,26 +108,26 @@ doTestMenu nextID
108108 s <- getLine >>= return . filter (/= '\n')
109109 case s of
110110 "q" -> return mempty
111− "" -> do
112− r <- runTest $ show nextID
111+ "" -> do
112+ r <- runTest $ show nextID
113113 rs <- doTestMenu ( nextID + 1 )
114114 return $ r : rs
115115 i | isJust ( lookup i testMenu ) -> do
116− r <- runTest i
116+ r <- runTest i
117117 rs <- doTestMenu ( read i + 1 )
118118 return $ r : rs
119119 where
120− displayTestMenu
120+ displayTestMenu
121121 = mapM_ displayTestMenu' testMenu
122− displayTestMenu' ( i, t )
123− = putStrLn $ ( if i == show nextID
124− then "> "
122+ displayTestMenu' ( i, t )
123+ = putStrLn $ ( if i == show nextID
124+ then "> "
125125 else " "
126126 ) ++ i ++ ". " ++ testName t
127127
128128runTest :: String -> IO (String, Bool)
129129runTest i = do
130− let t = fromJust $ lookup i testMenu
130+ let t = fromJust $ lookup i testMenu
131131 printSummary t
132132 waitForReturn
133133 testAction t
@@ -153,8 +153,8 @@ data Test = Test
153153 , confirmResults :: IO Bool
154154 }
155155
156−allTests
157− = [ reserveOutputTest
156+allTests
157+ = [ reserveOutputTest
158158 , displayBoundsTest0
159159 , displayBoundsTest1
160160 , displayBoundsTest2
@@ -185,7 +185,7 @@ allTests
185185 , layer1
186186 ]
187187
188−reserveOutputTest = Test
188+reserveOutputTest = Test
189189 { testName = "Initialize and reserve terminal output then restore previous state."
190190 , testID = "reserveOutputTest"
191191 , testAction = do
@@ -203,7 +203,7 @@ reserveOutputTest = Test
203203 , printSummary = do
204204 putStr $ [s|
205205Once return is pressed:
206− 0. The screen will be cleared.
206+ 0. The screen will be cleared.
207207 1. Four lines of text should be visible.
208208 1. The cursor should be visible and at the start of the fifth line.
209209
@@ -391,7 +391,7 @@ utf8Txt0 = [ [ 0xe2 , 0x86 , 0x91 ]
391391
392392iso10646Txt0 :: String
393393iso10646Txt0 = map toEnum
394− [ 8593
394+ [ 8593
395395 , 8593
396396 , 8595
397397 , 8595
@@ -554,11 +554,11 @@ After return is pressed for the second time:
554554allColors = zip [ black, red, green, yellow, blue, magenta, cyan, white ]
555555 [ "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white" ]
556556
557−allBrightColors
557+allBrightColors
558558 = zip [ brightBlack, brightRed, brightGreen, brightYellow, brightBlue, brightMagenta, brightCyan, brightWhite ]
559559 [ "bright black", "bright red", "bright green", "bright yellow", "bright blue", "bright magenta", "bright cyan", "bright white" ]
560560
561−attributesTest0 = Test
561+attributesTest0 = Test
562562 { testName = "Character attributes: foreground colors."
563563 , testID = "attributesTest0"
564564 , testAction = do
@@ -604,7 +604,7 @@ Did the test output match the description?
604604 defaultSuccessConfirmResults
605605 }
606606
607−attributesTest1 = Test
607+attributesTest1 = Test
608608 { testName = "Character attributes: background colors."
609609 , testID = "attributesTest1"
610610 , testAction = do
@@ -659,7 +659,7 @@ Did the test output match the description?
659659 defaultSuccessConfirmResults
660660 }
661661
662−attributesTest2 = Test
662+attributesTest2 = Test
663663 { testName = "Character attributes: Vivid foreground colors."
664664 , testID = "attributesTest2"
665665 , testAction = do
@@ -686,23 +686,23 @@ Once return is pressed:
686686 1. The cursor will be hidden.
687687 2. 9 lines of text in three columns will be drawn:
688688 a. The first column will be a name of a standard color (for an 8 color
689− terminal) rendered with that color as the foreground color.
689+ terminal) rendered with that color as the foreground color.
690690 b. The next column will be also be the name of a standard color rendered
691691 with that color as the foreground color but the shade used should be
692− more vivid than the shade used in the first column.
692+ more vivid than the shade used in the first column.
693693 c. The final column will be the name of a color rendered with the
694694 default attributes.
695695
696696For instance, one line will be the word "magenta" and that word should be
697−rendered in the magenta color.
697+rendered in the magenta color.
698698
699699I'm not actually sure exactly what "vivid" means in this context. For xterm the
700−vivid colors are brighter.
700+vivid colors are brighter.
701701
702−Verify:
702+Verify:
703703 * The first column: The foreground color matches the named color.
704704 * The second column: The foreground color matches the named color but is
705− more vivid than the color used in the first column.
705+ more vivid than the color used in the first column.
706706 * The third column: All text is rendered with the default attributes.
707707 * The vertical bars used in each line to mark the border of a column are
708708 lined up.
@@ -718,7 +718,7 @@ Did the test output match the description?
718718 defaultSuccessConfirmResults
719719 }
720720
721−attributesTest3 = Test
721+attributesTest3 = Test
722722 { testName = "Character attributes: Vivid background colors."
723723 , testID = "attributesTest3"
724724 , testAction = do
@@ -746,23 +746,23 @@ Once return is pressed:
746746 2. 9 lines of text in three columns will be drawn:
747747 a. The first column will contain be a name of a standard color for an 8
748748 color terminal rendered with the default foreground color with a
749− background the named color.
749+ background the named color.
750750 b. The first column will contain be a name of a standard color for an 8
751751 color terminal rendered with the default foreground color with the
752− background a vivid version of the named color.
752+ background a vivid version of the named color.
753753 c. The third column will be the name of a standard color rendered with
754754 the default attributes.
755−
755+
756756For instance, one line will contain be the word "magenta" and the word should
757−be rendered in the default foreground color over a magenta background.
757+be rendered in the default foreground color over a magenta background.
758758
759759I'm not actually sure exactly what "vivid" means in this context. For xterm the
760760vivid colors are brighter.
761761
762−Verify:
762+Verify:
763763 * The first column: The background color matches the named color.
764764 * The second column: The background color matches the named color and is
765− more vivid than the color used in the first column.
765+ more vivid than the color used in the first column.
766766 * The third column column: All text is rendered with the default attributes.
767767 * The vertical bars used in each line to mark the border of a column are
768768 lined up.
@@ -785,7 +785,7 @@ Did the test output match the description?
785785 defaultSuccessConfirmResults
786786 }
787787
788−attrCombos =
788+attrCombos =
789789 [ ( "default", id )
790790 , ( "bold", flip withStyle bold )
791791 , ( "blink", flip withStyle blink )
@@ -796,7 +796,7 @@ attrCombos =
796796 , ( "bold + blink + underline", flip withStyle (bold + blink + underline) )
797797 ]
798798
799−attributesTest4 = Test
799+attributesTest4 = Test
800800 { testName = "Character attributes: Bold; Blink; Underline."
801801 , testID = "attributesTest4"
802802 , testAction = do
@@ -819,10 +819,10 @@ attributesTest4 = Test
819819Once return is pressed:
820820 0. The screen will be cleared.
821821 1. The cursor will be hidden.
822− 2. 8 rows of text in two columns.
822+ 2. 8 rows of text in two columns.
823823 The rows will contain the following text:
824824 default
825− bold
825+ bold
826826 blink
827827 underline
828828 bold + blink
@@ -831,8 +831,8 @@ Once return is pressed:
831831 bold + blink + underline
832832 The first column will be rendered with the described attributes. The second
833833 column will be rendered with the default attributes.
834−
835−Verify:
834+
835+Verify:
836836 * The vertical bars used in each line to mark the border of a column are
837837 lined up.
838838 * The text in the first column is rendered as described.
@@ -848,7 +848,7 @@ Did the test output match the description?
848848 defaultSuccessConfirmResults
849849 }
850850
851−attributesTest5 = Test
851+attributesTest5 = Test
852852 { testName = "Character attributes: 240 color palette"
853853 , testID = "attributesTest5"
854854 , testAction = do
@@ -873,7 +873,7 @@ Once return is pressed:
873873 2. A 20 character wide and 12 row high block of color squares. This should look like a palette
874874 of some sort. I'm not exactly sure if all color terminals use the same palette. I doubt it...
875875
876−Verify:
876+Verify:
877877
878878After return is pressed for the second time:
879879 0. The screen containing the test summary should be restored.
@@ -971,7 +971,7 @@ outputPicAndWait pic = do
971971 releaseDisplay t
972972 releaseTerminal t
973973 return ()
974−
974+
975975vertCropTest0 :: Test
976976vertCropTest0 = Test
977977 { testName = "Verify bottom cropping works as expected with single column chars"
@@ -1046,7 +1046,7 @@ horizCropTest0 = Test
10461046 , testID = "cropTest0"
10471047 , testAction = do
10481048 let baseImage = vertCat $ map (string defAttr) lorumIpsum
1049− croppedImage = cropRight (imageWidth baseImage `div` 2) baseImage
1049+ croppedImage = cropRight (imageWidth baseImage `div` 2) baseImage
10501050 image = baseImage <-> backgroundFill 10 2 <-> croppedImage
10511051 outputImageAndWait image
10521052 , printSummary = putStr $ [s|
@@ -1063,7 +1063,7 @@ horizCropTest1 = Test
10631063 , testID = "cropTest0"
10641064 , testAction = do
10651065 let baseImage = vertCat $ map (string defAttr) lorumIpsumChinese
1066− croppedImage = cropRight (imageWidth baseImage `div` 2) baseImage
1066+ croppedImage = cropRight (imageWidth baseImage `div` 2) baseImage
10671067 image = baseImage <-> backgroundFill 10 2 <-> croppedImage
10681068 outputImageAndWait image
10691069 , printSummary = putStr $ [s|
@@ -1080,7 +1080,7 @@ horizCropTest2 = Test
10801080 , testID = "cropTest0"
10811081 , testAction = do
10821082 let baseImage = vertCat $ map (string defAttr) lorumIpsum
1083− croppedImage = cropLeft (imageWidth baseImage `div` 2) baseImage
1083+ croppedImage = cropLeft (imageWidth baseImage `div` 2) baseImage
10841084 image = baseImage <-> backgroundFill 10 2 <-> croppedImage
10851085 outputImageAndWait image
10861086 , printSummary = putStr $ [s|
@@ -1097,7 +1097,7 @@ horizCropTest3 = Test
10971097 , testID = "cropTest0"
10981098 , testAction = do
10991099 let baseImage = vertCat $ map (string defAttr) lorumIpsumChinese
1100− croppedImage = cropLeft (imageWidth baseImage `div` 2) baseImage
1100+ croppedImage = cropLeft (imageWidth baseImage `div` 2) baseImage
11011101 image = baseImage <-> backgroundFill 10 2 <-> croppedImage
11021102 outputImageAndWait image
11031103 , printSummary = putStr $ [s|