[PATCH 0 of 2 RFC] tests: another try to asciify output of tsttest
mg at lazybytes.net
Thu Sep 30 15:24:28 CDT 2010
Yuya Nishihara <yuya at tcha.org> writes:
> Hi, this patch implements ascii-safe test output. It can be enabled
> selectively by " (escape)" tag, like (re) or (glob).
I had expected this to be a filter that was applied to all lines before
the optional glob or regex substitution took place.
> Since the previous patch changed whole outputs escaped, it needs to
> suppress escape of some common characters,'\t' or '\\', to avoid
> annoyane. But sometimes '\t' will be better to be escaped. So I
> consider to escape all control characters and not to enable it by
Are you saying that there are cases where it is better not to escape a
TAB character in the .t file?
Perhaps we should simply do it the other way around -- instead of
escaping the actual output, we decode the expected output:
expected_output = expected_output.decode('string-escape')
if expected_output == actual_output:
That would make \t and a real TAB equal in the expected output.
Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the Mercurial-devel