changeset 37317:14da486e820d

py3: use print as a function in tests/test-walk.t Differential Revision: https://phab.mercurial-scm.org/D3070
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 19 Mar 2018 12:46:56 +0530
parents 836867586b83
children 9954d0e2ad00
files tests/test-walk.t
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-walk.t	Tue Apr 03 13:19:35 2018 -0700
+++ b/tests/test-walk.t	Mon Mar 19 12:46:56 2018 +0530
@@ -519,7 +519,12 @@
 
   $ cd t
   $ echo fennel > overflow.list
-  $ $PYTHON -c "for i in range(20000 / 100): print 'x' * 100" >> overflow.list
+  $ cat >> printnum.py <<EOF
+  > from __future__ import print_function
+  > for i in range(20000 // 100):
+  >   print('x' * 100)
+  > EOF
+  $ $PYTHON printnum.py >> overflow.list
   $ echo fenugreek >> overflow.list
   $ hg debugwalk 'listfile:overflow.list' 2>&1 | egrep -v '(^matcher: |^xxx)'
   f  fennel     fennel     exact