tests/test-hgk.t
author Martin von Zweigbergk <martinvonz@google.com>
Fri, 11 Sep 2020 09:55:08 -0700
changeset 45449 814c7430f828
parent 23451 5fb1fc2e1281
permissions -rw-r--r--
tests: make emacs test less strict It was failing like this for me: ``` @@ -2,7 +2,7 @@ $ emacs -q -no-site-file -batch -l $TESTDIR/../contrib/hg-test-mode.el \ > -f ert-run-tests-batch-and-exit Running 1 tests (*) (glob) - passed 1/1 hg-test-mode--compilation-mode-support + passed 1/1 hg-test-mode--compilation-mode-support (0.045732 sec) - Ran 1 tests, 1 results as expected (*) (glob) + Ran 1 tests, 1 results as expected, 0 unexpected (2020-09-11 16:49:56+0000, 0.046034 sec) ``` Differential Revision: https://phab.mercurial-scm.org/D9017

Minimal hgk check

  $ echo "[extensions]" >> $HGRCPATH
  $ echo "hgk=" >> $HGRCPATH
  $ hg init repo
  $ cd repo
  $ echo a > a
  $ hg ci -Am adda
  adding a
  $ hg debug-cat-file commit 0
  tree a0c8bcbbb45c
  parent 000000000000
  author test 0 0
  revision 0
  branch default
  phase draft
  
  adda
  $ echo b > b
  $ hg ci -Am addb
  adding b
  $ hg log -T '{node}\n'
  102a90ea7b4a3361e4082ed620918c261189a36a
  07f4944404050f47db2e5c5071e0e84e7a27bba9

  $ hg debug-diff-tree 07f494440405 102a90ea7b4a
  :000000 100664 000000000000 1e88685f5dde N	b	b
  $ hg debug-diff-tree 07f494440405 102a90ea7b4a --patch
  diff --git a/b b/b
  new file mode 100644
  --- /dev/null
  +++ b/b
  @@ -0,0 +1,1 @@
  +b

Ensure that diff-tree output isn't affected by diffopts
  $ hg --config diff.noprefix=True debug-diff-tree 07f494440405 102a90ea7b4a
  :000000 100664 000000000000 1e88685f5dde N	b	b
  $ hg --config diff.noprefix=True debug-diff-tree --patch 07f494440405 102a90ea7b4a
  diff --git a/b b/b
  new file mode 100644
  --- /dev/null
  +++ b/b
  @@ -0,0 +1,1 @@
  +b

  $ cd ..