gabrielfalcao/lettuce — Issue #234: Dark green step output not replaced if text wraps in terminal
Author: oatman
Created: 2012-03-09 15:19:49+00:00
State: open

I love that the step output is dark green while it is running and changes to red or green if it passes or fails.
However, if the line wraps, like in this example:

```
Scenario: Register on website # features/web.feature:12
Given I go to "/register" relative to the session website # features/steps-web.py:59
I should see "Create account" within 3 seconds # home/oatman/.virtualenvs/
lettuce-testing/local/lib/python2.7/site-packages/lettuce_webdriver/webdriver.py:108
```

You can see that the last line is actually the penultimate line wrapped. This causes whatever is ouptuting the line to only replace the latest line, not the whole two-line command. So we end up with duplicate lines, one in dark green, and another in light green.

This probably escaped notice because normal paths are very short (see the first two lines of the above example) but when you add extra step libraries (like the excellent lettuce-webdriver) you have a full path printed out, which invariable is long, with folders like "/local/lib/python2.7/site-packages/" bulking up the line.

I'm not sure what can be done to detect this, as it could be console/os-specific.