diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-04-28 21:22:18 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-04-28 21:22:18 +0200 |
commit | 56f6e4fb7b8c0fc6545843d467412fbfa8acb277 (patch) | |
tree | 3ce6802fa90fe0c0d161819f49527ea956969269 /test | |
parent | dfb3cf0e71686ab12977b172f0b992414878e63d (diff) |
refactoring: eliminate custom ESC handling
Diffstat (limited to 'test')
-rw-r--r-- | test/runTests.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/runTests.hs b/test/runTests.hs index 299d5ad0..a0edf147 100644 --- a/test/runTests.hs +++ b/test/runTests.hs | |||
@@ -242,8 +242,8 @@ printOldNew :: String -> [Item String] -> [String] | |||
242 | printOldNew msg d = (msg ++ " has changed.") : ff [] 0 d | 242 | printOldNew msg d = (msg ++ " has changed.") : ff [] 0 d |
243 | where | 243 | where |
244 | ff acc n (x@(Both a b): ds) = [a' | n < 5] ++ ff (a':acc) (n+1) ds where a' = " " ++ a | 244 | ff acc n (x@(Both a b): ds) = [a' | n < 5] ++ ff (a':acc) (n+1) ds where a' = " " ++ a |
245 | ff acc n (Old a: ds) = g acc n ++ (ESC "42" ("< " ++ ESC "49" a)): ff [] 0 ds | 245 | ff acc n (Old a: ds) = g acc n ++ (show (onred "< ") ++ a): ff [] 0 ds |
246 | ff acc n (New b: ds) = g acc n ++ (ESC "41" ("> " ++ ESC "49" b)): ff [] 0 ds | 246 | ff acc n (New b: ds) = g acc n ++ (show (ongreen "> ") ++ b): ff [] 0 ds |
247 | ff _ _ [] = [] | 247 | ff _ _ [] = [] |
248 | g acc n | n < 5 = [] | 248 | g acc n | n < 5 = [] |
249 | g acc n | n > 10 = "___________": reverse (take 5 acc) | 249 | g acc n | n > 10 = "___________": reverse (take 5 acc) |