git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pickfire <pickfire@riseup.net>
To: jacob.keller@gmail.com
Cc: git@vger.kernel.org
Subject: Re: Re: Microproject | Add more builtin patterns for userdiff
Date: Wed, 29 Mar 2017 01:53:56 +0800	[thread overview]
Message-ID: <20170328175356.1GG4n_Oas%pickfire@riseup.net> (raw)
In-Reply-To: <CA+P7+xr+vJP=usEhnR2gZdNY+k8035sX9FgFvvrrL5j_xCu=Mg@mail.gmail.com>

Jacob Keller <jacob.keller@gmail.com> wrote:

> On Tue, Mar 28, 2017 at 3:46 AM, Pickfire <pickfire@riseup.net> 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?

  reply	other threads:[~2017-03-28 17:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 10:46 Microproject | Add more builtin patterns for userdiff Pickfire
2017-03-28 12:31 ` Jacob Keller
2017-03-28 17:53   ` Pickfire [this message]
2017-03-28 18:10     ` Jacob Keller
2017-03-29  1:55       ` Pickfire
2017-03-28 18:11 ` Stefan Beller
2017-03-29  1:54   ` Pickfire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170328175356.1GG4n_Oas%pickfire@riseup.net \
    --to=pickfire@riseup.net \
    --cc=git@vger.kernel.org \
    --cc=jacob.keller@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).