Patchwork [6,of,7] tests: add test cases for binary diffs in Git mode

login
register
mail settings
Submitter Alexander Fomin
Date March 21, 2017, 5:08 p.m.
Message ID <e9044ade1523e847877f.1490116119@devvm2125.lla2.facebook.com>
Download mbox | patch
Permalink /patch/19533/
State Changes Requested
Headers show

Comments

Alexander Fomin - March 21, 2017, 5:08 p.m.
# HG changeset patch
# User Alexander Fomin <afomin@fb.com>
# Date 1490113366 25200
#      Tue Mar 21 09:22:46 2017 -0700
# Node ID e9044ade1523e847877f4eee1d4e06734e2aa4cd
# Parent  98301edf86daecef6ef43357b0934c351f58574d
tests: add test cases for binary diffs in Git mode

This patch adds some test cases to verify binary diffs are not generated in
Git mode unless explicitly requested by user (issue5510).

Patch

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
@@ -19,6 +19,10 @@ 
 
   $ hg diff --nodates -r 0 -r 2
 
+  $ hg diff --git -r 0 -r 1
+  diff --git a/binfile.bin b/binfile.bin
+  Binary file binfile.bin has changed
+
   $ hg diff --git -a -r 0 -r 1
   diff --git a/binfile.bin b/binfile.bin
   index 37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9..58dc31a9e2f40f74ff3b45903f7d620b8e5b7356
@@ -44,6 +48,10 @@ 
   diff --git a/binfile.bin b/binfile.bin
   Binary file binfile.bin has changed
 
+  $ HGPLAIN=1 hg diff --git -r 0 -r 1
+  diff --git a/binfile.bin b/binfile.bin
+  Binary file binfile.bin has changed
+
   $ HGPLAIN=1 hg diff --config diff.nobinary=True --git -a -r 0 -r 1
   diff --git a/binfile.bin b/binfile.bin
   index 37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9..58dc31a9e2f40f74ff3b45903f7d620b8e5b7356