Re: Re: Microproject | Add more builtin patterns for userdiff

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

 



Jacob Keller <jacob.keller@xxxxxxxxx> wrote:

> On Tue, Mar 28, 2017 at 3:46 AM, Pickfire <pickfire@xxxxxxxxxx> wrote:
> > While I was working buildins shell patterns for user diffs. I noticed that
> > the tests t4034 passes but I can reproduce it manually with:
> >
> >     mkdir cpp/ && cd cpp/ && git init
> >
> >     cat > pre <<EOF
> >     Foo():x(0&&1){}
> >     cout<<"Hello World!\n"<<endl;
> >     1 -1e10 0xabcdef 'x'
> >     [a] a->b a.b
> >     !a ~a a++ a-- a*b a&b
> >     a*b a/b a%b
> >     a+b a-b
> >     a<<b a>>b
> >     a<b a<=b a>b a>=b
> >     a==b a!=b
> >     a&b
> >     a^b
> >     a|b
> >     a&&b
> >     a||b
> >     a?b:z
> >     a=b a+=b a-=b a*=b a/=b a%=b a<<=b a>>=b a&=b a^=b a|=b
> >     a,y
> >     a::b
> >     EOF
> >
> >     cat > post <<EOF
> >     Foo() : x(0&42) { bar(x); }
> >     cout<<"Hello World?\n"<<endl;
> >     (1) (-1e10) (0xabcdef) 'y'
> >     [x] x->y x.y
> >     !x ~x x++ x-- x*y x&y
> >     x*y x/y x%y
> >     x+y x-y
> >     x<<y x>>y
> >     x<y x<=y x>y x>=y
> >     x==y x!=y
> >     x&y
> >     x^y
> >     x|y
> >     x&&y
> >     x||y
> >     x?y:z
> >     x=y x+=y x-=y x*=y x/=y x%=y x<<=y x>>=y x&=y x^=y x|=y
> >     x,y
> >     x::y
> >     EOF
> >
> >     echo '* diff="cpp"' > .gitmodules
> >     git diff --no-index --color-words pre post > output
> >
> > Surprisingly, it shows (which is very different from the expected output):
> >
> 
> The diff test code uses "test_decode_color" function which decodes the
> color commands into human readable text. From the looks of it, you're
> trying to reproduce the test outside the test suite. However, you're
> not decoding the colors using the test library function, so it doesn't
> look right.

Yes, I can't reproduce it outside the test suite. I have added the builtin
and yet the test fails. test_decode_color gets same output as expect but
still it fails, should I send in the patch?



[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]