Skip to content

ANSI output confuses terminal when catting test log #476

Description

@joeyh

I capture the test suite output to a log file and sometimes cat the log file. With tasty-1.5.4, I noticed an odd new behavior when doing that, which can also be seen when using head:

$ head -n1 log
Tests
^[[35;80R$

As well as the odd display of an escape code before the "$" shell prompt, if I then hit enter, this happens:

dash: 5: ot found
dash: 5: 80R: not found
$

Note that I'm using dash here with the default configuration, to rule out some problem with my shell. The above is in gnome-terminal, but I also see the same thing in xterm.

Looking at the tasty log in question the first line is this:

^[7^[[10000;10000H^[[6n^[8Tests

How that turns into ^[[35;80R getting shoved into the keyboard buffer, I do not know!

Note that tasty-1.5.4 generates those escape sequences even when run with --color=never --ansi-tricks=false

With tasty-1.5.3, there are no escape characters output with those flags, and this problem does not occur.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions