From: Lars Schneider Date: Tue, 22 Sep 2015 10:09:20 GMT Subject: Re: [PATCH v4 1/2] git-p4: add test case for "Translation of file content failed" error Message-ID: <9F835973-7045-4AA7-A0B0-D3D3C6F25D73@gmail.com> In-Reply-To: On 22 Sep 2015, at 03:10, Junio C Hamano wrote: > Eric Sunshine writes: > >> Yes, it's because $d is a variable reference, even within double >> quotes. > > s/even/especially/ ;-) > > Here is what I queued as SQUASH??? > > diff --git a/t/t9825-git-p4-handle-utf16-without-bom.sh b/t/t9825-git-p4-handle-utf16-without-bom.sh > index 65c3c4e..735c0bb 100644 > --- a/t/t9825-git-p4-handle-utf16-without-bom.sh > +++ b/t/t9825-git-p4-handle-utf16-without-bom.sh > @@ -22,8 +22,8 @@ test_expect_success 'init depot with UTF-16 encoded file and artificially remove > cd "db" && > p4d -jc && > # P4D automatically adds a BOM. Remove it here to make the file invalid. > - sed -e "$ d" depot/file1,v >depot/file1,v.new && > - mv -- depot/file1,v.new depot/file1,v && > + sed -e "\$d" depot/file1,v >depot/file1,v.new && > + mv depot/file1,v.new depot/file1,v && > printf "@$UTF16@" >>depot/file1,v && > p4d -jrF checkpoint.1 > ) This works. I even tested successfully this one: sed \$d depot/file1,v >depot/file1,v.new && Do we need the ā€œ-eā€ option? Thanks, Lars