changeset 31280:59aec562a50b

test: end printed diff "hunks" with an empty string in test-context.py So that the resulting diff is correct and does not include a spurious empty line between lines "diff --git a/foo b/foo" and "--- a/foo".
author Denis Laxalde <denis.laxalde@logilab.fr>
date Fri, 03 Mar 2017 16:17:17 +0100
parents 5e7fd3a0b17f
children b3861be6aa6c
files tests/test-context.py tests/test-context.py.out
diffstat 2 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-context.py	Thu Mar 02 17:22:46 2017 +0100
+++ b/tests/test-context.py	Fri Mar 03 16:17:17 2017 +0100
@@ -59,7 +59,7 @@
 # test performing a diff on a memctx
 
 for d in ctxb.diff(ctxa, git=True):
-    print(d)
+    print(d, end='')
 
 # test safeness and correctness of "ctx.status()"
 print('= checking context.status():')
--- a/tests/test-context.py.out	Thu Mar 02 17:22:46 2017 +0100
+++ b/tests/test-context.py.out	Fri Mar 03 16:17:17 2017 +0100
@@ -4,13 +4,11 @@
 UTF-8   : Grüezi!
 <status modified=['foo'], added=[], removed=[], deleted=[], unknown=[], ignored=[], clean=[]>
 diff --git a/foo b/foo
-
 --- a/foo
 +++ b/foo
 @@ -1,1 +1,2 @@
  foo
 +bar
-
 = checking context.status():
 == checking workingctx.status:
 wctx._status=<status modified=['bar-m'], added=['bar-a'], removed=['bar-r'], deleted=[], unknown=[], ignored=[], clean=[]>