test-context: add test for performing a diff on a memctx
We now see the first result of all that refactoring of memctx: we can now diff
against a memctx.
--- a/tests/test-context.py Fri Jun 13 15:56:11 2014 -0700
+++ b/tests/test-context.py Fri Jun 13 15:59:18 2014 -0700
@@ -41,8 +41,12 @@
return context.memfilectx(repo, f, data, 'l' in flags, 'x' in flags)
ctxa = repo.changectx(0)
-ctxb = context.memctx(repo, [ctxa.node(), None],
- "test diff",
- ["foo"], getfilectx)
+ctxb = context.memctx(repo, [ctxa.node(), None], "test diff", ["foo"],
+ getfilectx, ctxa.user(), ctxa.date())
print ctxb.status(ctxa)
+
+# test performing a diff on a memctx
+
+for d in ctxb.diff(ctxa, git=True):
+ print d
--- a/tests/test-context.py.out Fri Jun 13 15:56:11 2014 -0700
+++ b/tests/test-context.py.out Fri Jun 13 15:59:18 2014 -0700
@@ -3,3 +3,11 @@
Latin-1 : Grüezi!
UTF-8 : Grüezi!
(['foo'], [], [], [], [], [], [])
+diff --git a/foo b/foo
+
+--- a/foo
++++ b/foo
+@@ -1,1 +1,2 @@
+ foo
++bar
+