Skip to content

Make bin/vspec output unbuffered in order to make it possible to create shell wrappers #34

@glts

Description

@glts

In the solution for #15 a final filter sed 's/\r$//' was added in bin/vspec.

Unfortunately, by default sed buffers its output, so it is no longer possible to add another filter and see the output live.

vspec . t/test.vim | grep '# TODO'
# have to wait until whole test is finished!

Making sed output unbuffered (sed -u) or line-buffered (sed -l) fixes the problem. Unfortunately there are many different sed flavours and not all of them have these flags.

The reason this is a problem for me is that I use a small benchmark wrapper around vspec, and the benchmark tests I run with it can take quite long. For one benchmark, for example, I have to wait 20 seconds until the whole thing is finished and I can see the benchmark results.

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