changeset 34442:73d8a5283f87

test-pager: make it compatible with chg chg's runpager implementation is different. It behaves differently for the "shell=False, command not found" case. Differential Revision: https://phab.mercurial-scm.org/D911
author Jun Wu <quark@fb.com>
date Mon, 02 Oct 2017 16:11:57 -0700
parents 50474f0b3f1b
children f2268edf38d5
files tests/test-pager.t
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-pager.t	Mon Oct 02 11:03:53 2017 +0100
+++ b/tests/test-pager.t	Mon Oct 02 16:11:57 2017 -0700
@@ -195,6 +195,7 @@
   paged! 'summary:     modify a 8\n'
   paged! '\n'
 
+#if no-chg
 An invalid pager command name is reported sensibly if we don't have to
 use shell=True in the subprocess call:
   $ hg log --limit 3 --config pager.pager=this-command-better-never-exist
@@ -215,6 +216,17 @@
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     modify a 8
   
+#else
+Currently, chg has its own runpager implementation, which does not show the
+"missing pager" message. The error message is globed out since the shell could
+print different message.
+  $ hg log --limit 3 --config pager.pager=this-command-better-never-exist
+  /bin/sh: this-command-better-never-exist: command not found (?)
+  * (glob) (?)
+  killed!
+  [255]
+
+#endif
 
 A complicated pager command gets worse behavior. Bonus points if you can
 improve this.