[PATCH] diff: rewrite V2. -1005 bytes

Denys Vlasenko vda.linux at googlemail.com
Fri Jan 15 03:27:53 UTC 2010


On Friday 15 January 2010 03:19, Matheus Izvekov wrote:
> > Do you have a real examples of files F1 and F2 where
> > it breaks "diff -ub F1 F2"? I want to add such an interesting
> > corner case to the testsuite.
> > 
> > --
> > vda
> 
> Try two files which are otherwise the same except:
> one ends without a newline, and that last character is not a space
> b ends with any space character.
> 
> So for example:
> echo -n "oi" > a
> 
> echo -n "oi " > b
> or even
> echo "oi" > b
> 
> and then diff both with flag -b
> current busybox does not handle this correctly.


Please find updated patch attached with read_token() fixed
and test added. Please add more tests if you have them.

--
vda

-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.patch
Type: text/x-diff
Size: 14942 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20100115/5b65e950/attachment-0001.bin>


More information about the busybox mailing list