On 4/4/17 11:21 PM, Alexander Fomin wrote:
# HG changeset patch
# User Alexander Fomin <afo...@fb.com>
# Date 1491335167 25200
# Tue Apr 04 12:46:07 2017 -0700
# Node ID 373acf7da1a621607a1cc062b96ad67a42a7e016
# Parent 27515c7e38db9d93e18b7df13149da7c0d88eeb2
tests: add tests for --binary option in Git mode
I think we should keep git uncapitalized here.
The code in patch 2 in this series looks good to me. This new test is
short enough that I'd fold it into the previous patch.
This patch adds some tests to verify correct --binary option behaviour in Git
mode (issue5510).
diff --git a/tests/test-diff-binary-file.t b/tests/test-diff-binary-file.t
--- a/tests/test-diff-binary-file.t
+++ b/tests/test-diff-binary-file.t
@@ -107,4 +107,28 @@
\ No newline at end of file
+\x00\x01\x02\x03 (esc)
Remember to add a comment (non-indented line here) with a quick summary
of the test.
The test itself looks good.
+ $ hg diff --no-binary -r 0 -r 1
+ diff -r fb45f71337ad -r 9ca112d1a3c1 binfile.bin
+ Binary file binfile.bin has changed
+
+ $ hg diff --git --no-binary -r 0 -r 1
+ diff --git a/binfile.bin b/binfile.bin
+ Binary file binfile.bin has changed
+
+ $ hg diff --git --binary -r 0 -r 1
+ diff --git a/binfile.bin b/binfile.bin
+ index
eaf36c1daccfdf325514461cd1a2ffbc139b5464..ba71a782e93f3fb63a428383706065e3ec2828e9
+ GIT binary patch
+ literal 5
+ Mc${NkWMbw50018V5dZ)H
+
+
+ $ hg diff --git --binary --config diff.nobinary=True -r 0 -r 1
+ diff --git a/binfile.bin b/binfile.bin
+ index
eaf36c1daccfdf325514461cd1a2ffbc139b5464..ba71a782e93f3fb63a428383706065e3ec2828e9
+ GIT binary patch
+ literal 5
+ Mc${NkWMbw50018V5dZ)H
+
+
$ cd ..
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel