Mercurial > hg
annotate tests/test-diff-newlines.t @ 35066:57d56f603f70
run-tests: fix TESTDIR if testdescs are absolute paths
Commit a18eef03d879 made TESTDIR be the location of the arguments that were
passed to run-tests.py instead of just PWD. It assumed that these tests were
specified using relative paths, so if pwd was /tmp/foo, and the first argument
was /tmp/baz, it would set TESTDIR to /tmp/foo//tmp/baz.
Differential Revision: https://phab.mercurial-scm.org/D1433
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Wed, 15 Nov 2017 17:54:27 -0800 |
parents | aaa1f8f514cf |
children | 5abc47d4ca6b |
rev | line source |
---|---|
12143
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
1 $ hg init |
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
2 |
33305
aaa1f8f514cf
py3: fix test-diff-newlines.t to be compatible with py3
Boris Feld <boris.feld@octobus.net>
parents:
22947
diff
changeset
|
3 $ $PYTHON -c 'open("a", "wb").write(b"confuse str.splitlines\nembedded\rnewline\n")' |
12143
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
4 $ hg ci -Ama -d '1 0' |
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
5 adding a |
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
6 |
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
7 $ echo clean diff >> a |
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
8 $ hg ci -mb -d '2 0' |
2248
b914f0557832
fix diffs containing embedded "\r".
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
9 |
12143
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
10 $ hg diff -r0 -r1 |
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
11 diff -r 107ba6f817b5 -r 310ce7989cdc a |
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
12 --- a/a Thu Jan 01 00:00:01 1970 +0000 |
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
13 +++ b/a Thu Jan 01 00:00:02 1970 +0000 |
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
14 @@ -1,2 +1,3 @@ |
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
15 confuse str.splitlines |
17742
405b6bd015df
run-tests: allow test output lines to be terminated with \r in addition to \n
Mads Kiilerich <mads@kiilerich.com>
parents:
15522
diff
changeset
|
16 embedded\r (no-eol) (esc) |
405b6bd015df
run-tests: allow test output lines to be terminated with \r in addition to \n
Mads Kiilerich <mads@kiilerich.com>
parents:
15522
diff
changeset
|
17 newline |
12143
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
18 +clean diff |
bf840a3d1af2
tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents:
2248
diff
changeset
|
19 |