changeset 40891:44378796c5e5

test: update test-logtoprocess.t to not requires less The test previously assumed that a working pager was present in the test environment. Update it to use the fakepager instead. Differential Revision: https://phab.mercurial-scm.org/D5399
author Boris Feld <boris.feld@octobus.net>
date Sun, 09 Dec 2018 16:49:55 +0100
parents 07e181ed82ef
children 348352658e4b
files tests/test-logtoprocess.t
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-logtoprocess.t	Sun Dec 09 21:23:34 2018 -0500
+++ b/tests/test-logtoprocess.t	Sun Dec 09 16:49:55 2018 +0100
@@ -89,6 +89,16 @@
 script will die after the timeout before we could touch the file and the
 resulting file will not exists. If not, we will touch the file and see it.
 
+  $ cat >> fakepager.py <<EOF
+  > import sys
+  > printed = False
+  > for line in sys.stdin:
+  >     sys.stdout.write(line)
+  >     printed = True
+  > if not printed:
+  >     sys.stdout.write('paged empty output!\n')
+  > EOF
+
   $ cat > $TESTTMP/wait-output.sh << EOF
   > #!/bin/sh
   > for i in \`$TESTDIR/seq.py 50\`; do
@@ -107,6 +117,8 @@
   > [extensions]
   > logtoprocess=
   > pager=
+  > [pager]
+  > pager = "$PYTHON" $TESTTMP/fakepager.py
   > [logtoprocess]
   > commandfinish=$TESTTMP/wait-output.sh
   > EOF