# HG changeset patch # User Augie Fackler # Date 1512870171 21600 # Node ID c7d49b87c1ee06b14d72de0ff58018bb10b49220 # Parent ea645c6c6d4609a8beedee97610ce27cb4d18a6c tests: use Python to write binary data in lfs test instead of shell The shell construct here appears to be unevenly supported: it works in /bin/sh on FreeBSD, but it doesn't seem to work when /bin/sh is dash. Using a Python inline directive works fine, so let's just do that instead. Differential Revision: https://phab.mercurial-scm.org/D1636 diff -r ea645c6c6d46 -r c7d49b87c1ee tests/test-lfs.t --- a/tests/test-lfs.t Sun Dec 10 05:41:05 2017 +0530 +++ b/tests/test-lfs.t Sat Dec 09 19:42:51 2017 -0600 @@ -232,9 +232,10 @@ $ hg mv b1 a2 $ hg commit -m b $ hg status - $ HEADER=$'\1\n' - $ printf '%sSTART-WITH-HG-FILELOG-METADATA' "$HEADER" > a2 - $ printf '%sMETA\n' "$HEADER" > a1 + >>> with open('a2', 'wb') as f: + ... f.write(b'\1\nSTART-WITH-HG-FILELOG-METADATA') + >>> with open('a1', 'wb') as f: + ... f.write(b'\1\nMETA\n') $ hg commit -m meta $ hg status $ hg log -T '{rev}: {file_copies} | {file_dels} | {file_adds}\n'