Today I ran into an annoyance when showing the output of some unit tests in the output window.
In Haskell, the QuickCheck library shows progress by first backspacing the previous status and printing the new one. This works fine in a command prompt window where it produces the desired updating status. Unfortunately the ouput window prints the backspace characters literally, resulting in output like this:
[code](0 tests) (1 test) (2 tests) (3 tests) (4 tests) (5 tests) (6 tests) (7 tests) (8 tests) (9 tests) (10 tests) (11 tests) (12 tests) (13 tests) (14 tests) (15 tests) (16 tests) (17 tests) (18 tests) (19 tests) (20 tests) (21 tests) (22 tests) (23 tests) (24 tests) (25 tests) (26 tests) (27 tests) (28 tests) (29 tests) (30 tests) (31 tests) (32 tests) (33 tests) (34 tests) (35 tests) (36 tests) (37 tests) (38 tests) (39 tests) (40 tests) (41 tests) (42 tests) (43 tests) (44 tests) (45 tests) (46 tests) (47 tests) (48 tests) (49 tests) (50 tests) (51 tests) (52 tests) (53 tests) (54 tests) (55 tests) (56 tests) (57 tests) (58 tests) (59 tests) (60 tests) (61 tests) (62 tests) (63 tests) (64 tests) (65 tests) (66 tests) (67 tests) (68 tests) (69 tests) (70 tests) (71 tests) (72 tests) (73 tests) (74 tests) (75 tests) (76 tests) (77 tests) (78 tests) (79 tests) (80 tests) (81 tests) (82 tests) (83 tests) (84 tests) (85 tests) (86 tests) (87 tests) (88 tests) (89 tests) (90 tests) (91 tests) (92 tests) (93 tests) (94 tests) (95 tests) (96 tests) (97 tests) (98 tests) (99 tests) +++ OK, passed 100 tests.
Cases: 7 Tried: 0 Errors: 0 Failures: 0
Cases: 7 Tried: 1 Errors: 0 Failures: 0
Cases: 7 Tried: 2 Errors: 0 Failures: 0
Cases: 7 Tried: 3 Errors: 0 Failures: 0
Cases: 7 Tried: 4 Errors: 0 Failures: 0
Cases: 7 Tried: 5 Errors: 0 Failures: 0
Cases: 7 Tried: 6 Errors: 0 Failures: 0
Cases: 7 Tried: 7 Errors: 0 Failures: 0
Counts {cases = 7, tried = 7, errors = 0, failures = 0}
[/code]
which is obviously not that easy to read. And this is only one test with 100 cases. You can imagine that 10 tests with 10000 cases each will output a lot of garbage.
The bottom bit (Cases: 7…) has a similar problem in that the library in question (HUnit) prints the message at a specified position, again resulting in a continuously overwritten status display, as long as you’re in a command prompt window.
I don’t think the latter problem will be fixable but I was hoping you could make backspace characters behave like backspaces, or to provide an option to toggle between the two behaviors.