[PATCH 0 of 1] tests: fix sed expression for BSD sed
Christian Ebert
blacktrash at gmx.net
Sat May 1 12:56:26 CDT 2010
* Mads Kiilerich on Saturday, May 01, 2010 at 17:47:26 +0200
>> * Giorgos Keramidas on Saturday, May 01, 2010 at 17:58:10 +0300
>>> BSD sed expects a newline right after '\' in expressions like
>>>
>>> sed -e '1 a \foo'
>>>
>>> Wrapping the line right after '\' fixes the test-keyword test on FreeBSD
>>> here:
>>>
>>> sed -e '1 a \
>>> foo'
>> Yes, thank you. I should have tested with the darwin-shipped sed
>> which needs the same.
>>
>
> FWIW none of them works on Solaris:
>
> -bash-4.1$ uname -a
> SunOS current10s 5.10 Generic_142900-01 sun4v sparc
> SUNW,SPARC-Enterprise-T5220
> -bash-4.1$ echo first | sed -e '1 a foo'
> sed: command garbled: 1 a foo
> -bash-4.1$ echo first | sed -e '1 a \foo'
> sed: command garbled: 1 a \foo
> -bash-4.1$ echo first | sed -e '1 a \
>> foo'
> sed: command garbled: 1 a \
> foo
> -bash-4.1$
Thanks. I'm gonna propose a fix, probably in python.
c
--
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org/
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions
More information about the Mercurial-devel
mailing list