[PATCH 1 of 3] run-tests: alternative way of handling \r on Windows
Adrian Buehlmann
adrian at cadifra.com
Wed Oct 17 06:10:34 CDT 2012
On 2012-10-15 02:45, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <mads at kiilerich.com>
> # Date 1350261192 -7200
> # Node ID b49d886bbc64ed0b4bd02f4df60db9175b3f5e80
> # Parent 9837cafc25b10c51659b65b5971622eab0bc9197
> run-tests: alternative way of handling \r on Windows
>
> After f71d60da58fb all \r was stripped from output on Windows, and the places
> where a \r explicitly was expected it was accepted that it was missing. Ugly
> hack.
>
> Instead we now accept that an extra \r might appear at the end of lines on
> Windows. That is more to the point and less ugly.
This seems to break a pile of tests on Windows. I got these with 72c234081ae1:
Failed test-atomictempfile.py: output changed
Failed test-batching.py: output changed
Failed test-bdiff.py: output changed
Failed test-commandserver.py: output changed
Failed test-context.py: output changed
Failed test-demandimport.py: output changed
Failed test-dispatch.py: output changed
Failed test-filelog.py: output changed
Failed test-hg-parseurl.py: output changed
Failed test-hgweb-auth.py: output changed
Failed test-hybridencode.py: output changed
Failed test-minirst.py: output changed
Failed test-parseindex2.py: output changed
Failed test-revlog-ancestry.py: output changed
Failed test-run-tests.t: output changed
Failed test-simplemerge.py: output changed
Failed test-status-inprocess.py: output changed
Failed test-trusted.py: output changed
Failed test-ui-color.py: output changed
Failed test-ui-config.py: output changed
Failed test-ui-verbosity.py: output changed
Failed test-wireproto.py: output changed
# Ran 356 tests, 97 skipped, 22 failed.
Example (fails with af7c6bc48d8d):
--- C:\Users\adi\hgrepos\hg-main\tests\test-run-tests.t
+++ C:\Users\adi\hgrepos\hg-main\tests\test-run-tests.t.err
@@ -24,16 +24,16 @@
Doctest commands:
>>> print 'foo'
- foo
+ foo\r (esc)
$ echo interleaved
interleaved
>>> for c in 'xyz':
... print c
- x
- y
- z
+ x\r (esc)
+ y\r (esc)
+ z\r (esc)
>>> print
-
+ \r (esc)
Regular expressions:
@@ -56,20 +56,21 @@
#if windows
$ printf 'crlf\r\ncr\r\tcrlf\r\ncrcrlf\r\r\n'
- crlf
+ crlf\r (esc)
cr\r (no-eol) (esc)
- \tcrlf (esc)
- crcrlf\r (esc)
+ crlf\r (esc)
+ crcrlf\r (no-eol) (esc)
+ \r (esc)
#endif
testing hghave
$ "$TESTDIR/hghave" true
$ "$TESTDIR/hghave" false
- skipped: missing feature: nail clipper
+ skipped: missing feature: nail clipper\r (esc)
[1]
$ "$TESTDIR/hghave" no-true
- skipped: system supports yak shaving
+ skipped: system supports yak shaving\r (esc)
[1]
$ "$TESTDIR/hghave" no-false
More information about the Mercurial-devel
mailing list