view tests/filtercr.py @ 14758:1e6661e09818 stable

color: be silent when falling back to ECMA-48 mode if "auto" mode was desired Don't warn about missing setab/setaf terminfo entries unless we explicitly asked for terminfo mode; fallback to ECMA-48 mode silently.
author Danek Duvall <duvall@comfychair.org>
date Mon, 27 Jun 2011 11:36:42 -0700
parents 6cfe17c19ba2
children
line wrap: on
line source

#!/usr/bin/env python

# Filter output by the progress extension to make it readable in tests

import sys, re

for line in sys.stdin:
    line = re.sub(r'\r+[^\n]', lambda m: '\n' + m.group()[-1:], line)
    sys.stdout.write(line)
print