Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 12 Mar 2008, Jeff King wrote:

> On Wed, Mar 12, 2008 at 08:43:36AM -0400, Jeff King wrote:
> 
> > It seems that /usr/bin/tr silently removes NULs from the input stream:
> > 
> >   $ printf 'foo\000bar' | xxd
> >   0000000: 666f 6f00 6261 72                        foo.bar
> >   $ printf 'foo\000bar' | /usr/bin/tr '\000' 'Q' | xxd
> >   0000000: 666f 6f62 6172                           foobar
> > 
> > I don't think there is an easy way around this; we might have to switch
> > to using perl.
> 
> Even more exciting, /usr/bin/tr actually works going the opposite
> direction, but /usr/ucb/tr doesn't:
> 
>   $ echo x | /usr/bin/tr x '\000' | xxd
>   0000000: 000a                                     ..
>   $ echo x | /usr/ucb/tr x '\000' | xxd
>   0000000: 780a                                     x.
> 
> but other characters seem to work:
> 
>   $ echo x | /usr/ucb/tr x '\012' | xxd
>   0000000: 0a0a                                     ..

All the more reson to make more things builtin.  (I agree that for tests, 
we should stay with tr, though.)

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux