tests/test-diff-newlines.t
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Fri, 26 Apr 2024 19:10:35 +0100
changeset 51626 865efc020c33
parent 49621 55c6ebd11cb9
permissions -rw-r--r--
dirstate: remove the python-side whitelist of allowed matchers This whitelist is too permissive because it allows matchers that contain disallowed ones deep inside, for example through `intersectionmatcher`. It is also too restrictive because it doesn't pass through some of the matchers we support, such as `patternmatcher`. It's also unnecessary because unsupported matchers raise `FallbackError` and we fall back anyway. Making this change makes more of the tests use rust code path, and therefore subtly change behavior. For example, rust status in largefiles repos seems to have strange behavior.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49621
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 39707
diff changeset
     1
  $ hg init repo
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 39707
diff changeset
     2
  $ cd repo
12143
bf840a3d1af2 tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents: 2248
diff changeset
     3
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 33305
diff changeset
     4
  $ "$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
     5
  $ hg ci -Ama -d '1 0'
bf840a3d1af2 tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents: 2248
diff changeset
     6
  adding a
bf840a3d1af2 tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents: 2248
diff changeset
     7
bf840a3d1af2 tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents: 2248
diff changeset
     8
  $ echo clean diff >> a
bf840a3d1af2 tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents: 2248
diff changeset
     9
  $ hg ci -mb -d '2 0'
2248
b914f0557832 fix diffs containing embedded "\r".
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    10
12143
bf840a3d1af2 tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents: 2248
diff changeset
    11
  $ hg diff -r0 -r1
bf840a3d1af2 tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents: 2248
diff changeset
    12
  diff -r 107ba6f817b5 -r 310ce7989cdc a
bf840a3d1af2 tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents: 2248
diff changeset
    13
  --- 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
    14
  +++ 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
    15
  @@ -1,2 +1,3 @@
bf840a3d1af2 tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents: 2248
diff changeset
    16
   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
    17
   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
    18
  newline
12143
bf840a3d1af2 tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents: 2248
diff changeset
    19
  +clean diff
bf840a3d1af2 tests: unify test-diff-newlines
Adrian Buehlmann <adrian@cadifra.com>
parents: 2248
diff changeset
    20