D913: test-globalopts: make the test compatible with chg

singhsrb (Saurabh Singh) phabricator at mercurial-scm.org
Tue Oct 3 00:16:36 UTC 2017


singhsrb created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The test fails when run with the '--chg' option. Therefore, this
  commit modifies the test to make it compatible with chg.

TEST PLAN
  Ran 'test-globalopts.t' with and without the '--chg' option.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D913

AFFECTED FILES
  tests/test-globalopts.t

CHANGE DETAILS

diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t
--- a/tests/test-globalopts.t
+++ b/tests/test-globalopts.t
@@ -263,8 +263,10 @@
 
 Testing --traceback:
 
-  $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
-  Traceback (most recent call last):
+chg only outputs the line corresponding to the abort. Therefore, for
+compatibility with chg, only testing the last line.
+  $ hg --cwd c --config x --traceback id 2>&1 | tail -n 1
+  abort: malformed --config option: 'x' (use --config section.name=value)
 
 Testing --time:
 



To: singhsrb, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list