sapling/eden/scm/tests/test-diff-binary.t
Mateusz Kwapich ad3f789bf9 py3: supress the write return value
Summary:
`>>> open(file).write(data)` is a common patten for writing files across the
tests. In py3 such statement return the number of bytes written in py2 the
output is none. Let's make it None in py3 as well.

Reviewed By: xavierd

Differential Revision: D19666339

fbshipit-source-id: 5424287f85f34f3aef2d1596bb476d622464564a
2020-01-31 13:00:23 -08:00

26 lines
567 B
Perl

#chg-compatible
$ newrepo
$ setconfig diff.git=1 diff.nobinary=1
>>> _ = open('a.bin', 'wb').write(b'\0\1')
$ hg commit -m A -A a.bin
>>> _ = open('a.bin', 'wb').write(b'\0\2')
$ hg diff
diff --git a/a.bin b/a.bin
Binary file a.bin has changed
$ HGPLAIN=1 hg diff
diff --git a/a.bin b/a.bin
index bdc955b7b2e610ad5a72302b139a2e6cb325519a..8835708590a9afa236e1bbad18df9d23de82ccd3
GIT binary patch
literal 2
Jc${Nk0ssI600RI3
$ HGPLAIN=1 HGPLAINEXCEPT=diffopts hg diff
diff --git a/a.bin b/a.bin
Binary file a.bin has changed