Browse Source

t4034: bulk verify builtin word regex sanity

The builtin word regexes should be tested with some simple examples
against simple issues.  Do this in bulk.

Mainly due to a lack of language knowledge and inspiration, most of
the test cases (cpp, csharp, java, objc, pascal, php, python, ruby)
are directly based off a C operator precedence table to verify that
all operators are split correctly.  This means that they are probably
incomplete or inaccurate except for 'cpp' itself.

Still, they are good enough to already have uncovered a typo in the
python and ruby patterns.

'fortran' is based on my anecdotal knowledge of the DO10I parsing
rules, and thus probably useless.  The rest (bibtex, html, tex) are an
ad-hoc test of what I consider important splits in those languages.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Thomas Rast 14 years ago committed by Junio C Hamano
parent
commit
8d96e7288f
  1. 15
      t/t4034-diff-words.sh
  2. 15
      t/t4034/bibtex/expect
  3. 10
      t/t4034/bibtex/post
  4. 9
      t/t4034/bibtex/pre
  5. 36
      t/t4034/cpp/expect
  6. 19
      t/t4034/cpp/post
  7. 19
      t/t4034/cpp/pre
  8. 35
      t/t4034/csharp/expect
  9. 18
      t/t4034/csharp/post
  10. 18
      t/t4034/csharp/pre
  11. 10
      t/t4034/fortran/expect
  12. 5
      t/t4034/fortran/post
  13. 5
      t/t4034/fortran/pre
  14. 8
      t/t4034/html/expect
  15. 3
      t/t4034/html/post
  16. 3
      t/t4034/html/pre
  17. 36
      t/t4034/java/expect
  18. 19
      t/t4034/java/post
  19. 19
      t/t4034/java/pre
  20. 35
      t/t4034/objc/expect
  21. 18
      t/t4034/objc/post
  22. 18
      t/t4034/objc/pre
  23. 35
      t/t4034/pascal/expect
  24. 18
      t/t4034/pascal/post
  25. 18
      t/t4034/pascal/pre
  26. 35
      t/t4034/php/expect
  27. 18
      t/t4034/php/post
  28. 18
      t/t4034/php/pre
  29. 34
      t/t4034/python/expect
  30. 17
      t/t4034/python/post
  31. 17
      t/t4034/python/pre
  32. 34
      t/t4034/ruby/expect
  33. 17
      t/t4034/ruby/post
  34. 17
      t/t4034/ruby/pre
  35. 9
      t/t4034/tex/expect
  36. 4
      t/t4034/tex/post
  37. 4
      t/t4034/tex/pre

15
t/t4034-diff-words.sh

@ -331,4 +331,19 @@ test_expect_success '--word-diff=none' ' @@ -331,4 +331,19 @@ test_expect_success '--word-diff=none' '

'

word_diff_for_language () {
cp "$TEST_DIRECTORY/t4034/$1/pre" \
"$TEST_DIRECTORY/t4034/$1/post" \
"$TEST_DIRECTORY/t4034/$1/expect" . &&
echo "* diff=$1" >.gitattributes &&
word_diff --color-words && cp output output.$1
}

for lang_dir in $TEST_DIRECTORY/t4034/*; do
lang=${lang_dir#$TEST_DIRECTORY/t4034/}
test_expect_success "diff driver '$lang' has sane word regex" "
word_diff_for_language $lang
"
done

test_done

15
t/t4034/bibtex/expect

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 95cd55b..ddcba9b 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,9 +1,10 @@<RESET>
@article{aldous1987uie,<RESET>
title={{Ultimate instability of exponential back-off protocol for acknowledgment-based transmission control of random access communication channels}},<RESET>
author={Aldous, <RED>D.<RESET><GREEN>David<RESET>},
journal={Information Theory, IEEE Transactions on},<RESET>
volume={<RED>33<RESET><GREEN>Bogus.<RESET>},
number={<RED>2<RESET><GREEN>4<RESET>},
pages={219--223},<RESET>
year=<GREEN>1987,<RESET>
<GREEN> note={This is in fact a rather funny read since ethernet works well in practice. The<RESET> {<RED>1987<RESET><GREEN>\em pre} reference is the right one, however.<RESET>}<RED>,<RESET>
}<RESET>

10
t/t4034/bibtex/post

@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
@article{aldous1987uie,
title={{Ultimate instability of exponential back-off protocol for acknowledgment-based transmission control of random access communication channels}},
author={Aldous, David},
journal={Information Theory, IEEE Transactions on},
volume={Bogus.},
number={4},
pages={219--223},
year=1987,
note={This is in fact a rather funny read since ethernet works well in practice. The {\em pre} reference is the right one, however.}
}

9
t/t4034/bibtex/pre

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
@article{aldous1987uie,
title={{Ultimate instability of exponential back-off protocol for acknowledgment-based transmission control of random access communication channels}},
author={Aldous, D.},
journal={Information Theory, IEEE Transactions on},
volume={33},
number={2},
pages={219--223},
year={1987},
}

36
t/t4034/cpp/expect

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 23d5c8a..7e8c026 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,19 +1,19 @@<RESET>
Foo() : x(0<RED>&&1<RESET><GREEN>&42<RESET>) { <GREEN>bar(x);<RESET> }
cout<<"Hello World<RED>!<RESET><GREEN>?<RESET>\n"<<endl;
<GREEN>(<RESET>1<GREEN>) (<RESET>-1e10<GREEN>) (<RESET>0xabcdef<GREEN>)<RESET> '<RED>x<RESET><GREEN>y<RESET>'
[<RED>a<RESET><GREEN>x<RESET>] <RED>a<RESET><GREEN>x<RESET>-><RED>b a<RESET><GREEN>y x<RESET>.<RED>b<RESET><GREEN>y<RESET>
!<RED>a<RESET><GREEN>x<RESET> ~<RED>a a<RESET><GREEN>x x<RESET>++ <RED>a<RESET><GREEN>x<RESET>-- <RED>a<RESET><GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>/<RED>b a<RESET><GREEN>y x<RESET>%<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>+<RED>b a<RESET><GREEN>y x<RESET>-<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<<RED>b a<RESET><GREEN>y x<RESET>>><RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<RED>b a<RESET><GREEN>y x<RESET><=<RED>b a<RESET><GREEN>y x<RESET>><RED>b a<RESET><GREEN>y x<RESET>>=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>==<RED>b a<RESET><GREEN>y x<RESET>!=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>^<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>|<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>||<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>?<RED>b<RESET><GREEN>y<RESET>:z
<RED>a<RESET><GREEN>x<RESET>=<RED>b a<RESET><GREEN>y x<RESET>+=<RED>b a<RESET><GREEN>y x<RESET>-=<RED>b a<RESET><GREEN>y x<RESET>*=<RED>b a<RESET><GREEN>y x<RESET>/=<RED>b a<RESET><GREEN>y x<RESET>%=<RED>b a<RESET><GREEN>y x<RESET><<=<RED>b a<RESET><GREEN>y x<RESET>>>=<RED>b a<RESET><GREEN>y x<RESET>&=<RED>b a<RESET><GREEN>y x<RESET>^=<RED>b a<RESET><GREEN>y x<RESET>|=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>,y
<RED>a<RESET><GREEN>x<RESET>::<RED>b<RESET><GREEN>y<RESET>

19
t/t4034/cpp/post

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
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

19
t/t4034/cpp/pre

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
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

35
t/t4034/csharp/expect

@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 9106d63..dd5f421 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,18 +1,18 @@<RESET>
Foo() : x(0<RED>&&1<RESET><GREEN>&42<RESET>) { <GREEN>bar(x);<RESET> }
cout<<"Hello World<RED>!<RESET><GREEN>?<RESET>\n"<<endl;
<GREEN>(<RESET>1<GREEN>) (<RESET>-1e10<GREEN>) (<RESET>0xabcdef<GREEN>)<RESET> '<RED>x<RESET><GREEN>y<RESET>'
[<RED>a<RESET><GREEN>x<RESET>] <RED>a<RESET><GREEN>x<RESET>-><RED>b a<RESET><GREEN>y x<RESET>.<RED>b<RESET><GREEN>y<RESET>
!<RED>a<RESET><GREEN>x<RESET> ~<RED>a a<RESET><GREEN>x x<RESET>++ <RED>a<RESET><GREEN>x<RESET>-- <RED>a<RESET><GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>/<RED>b a<RESET><GREEN>y x<RESET>%<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>+<RED>b a<RESET><GREEN>y x<RESET>-<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<<RED>b a<RESET><GREEN>y x<RESET>>><RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<RED>b a<RESET><GREEN>y x<RESET><=<RED>b a<RESET><GREEN>y x<RESET>><RED>b a<RESET><GREEN>y x<RESET>>=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>==<RED>b a<RESET><GREEN>y x<RESET>!=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>^<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>|<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>||<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>?<RED>b<RESET><GREEN>y<RESET>:z
<RED>a<RESET><GREEN>x<RESET>=<RED>b a<RESET><GREEN>y x<RESET>+=<RED>b a<RESET><GREEN>y x<RESET>-=<RED>b a<RESET><GREEN>y x<RESET>*=<RED>b a<RESET><GREEN>y x<RESET>/=<RED>b a<RESET><GREEN>y x<RESET>%=<RED>b a<RESET><GREEN>y x<RESET><<=<RED>b a<RESET><GREEN>y x<RESET>>>=<RED>b a<RESET><GREEN>y x<RESET>&=<RED>b a<RESET><GREEN>y x<RESET>^=<RED>b a<RESET><GREEN>y x<RESET>|=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>,y

18
t/t4034/csharp/post

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
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

18
t/t4034/csharp/pre

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
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

10
t/t4034/fortran/expect

@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 87f0d0b..d308da2 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,5 +1,5 @@<RESET>
print *, "Hello World<RED>!<RESET><GREEN>?<RESET>"

DO10I = 1,10<RESET>
<RED>DO10I<RESET><GREEN>DO 10 I<RESET> = 1,10
<RED>DO10I<RESET><GREEN>DO 1 0 I<RESET> = 1,10

5
t/t4034/fortran/post

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
print *, "Hello World?"

DO10I = 1,10
DO 10 I = 1,10
DO 1 0 I = 1,10

5
t/t4034/fortran/pre

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
print *, "Hello World!"

DO10I = 1,10
DO10I = 1,10
DO10I = 1,10

8
t/t4034/html/expect

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 8ca4aea..46921e5 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,3 +1,3 @@<RESET>
<tag <GREEN>newattr="newvalue"<RESET>><GREEN>added<RESET> content</tag>
<tag attr=<RED>"value"<RESET><GREEN>"newvalue"<RESET>><RED>content<RESET><GREEN>changed<RESET></tag>
<<RED>tag<RESET><GREEN>newtag<RESET>>content <RED>&entity;<RESET><GREEN>&newentity;<RESET><<RED>/tag<RESET><GREEN>/newtag<RESET>>

3
t/t4034/html/post

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
<tag newattr="newvalue">added content</tag>
<tag attr="newvalue">changed</tag>
<newtag>content &newentity;</newtag>

3
t/t4034/html/pre

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
<tag>content</tag>
<tag attr="value">content</tag>
<tag>content &entity;</tag>

36
t/t4034/java/expect

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 23d5c8a..7e8c026 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,19 +1,19 @@<RESET>
Foo() : x(0<RED>&&1<RESET><GREEN>&42<RESET>) { <GREEN>bar(x);<RESET> }
cout<<"Hello World<RED>!<RESET><GREEN>?<RESET>\n"<<endl;
<GREEN>(<RESET>1<GREEN>) (<RESET>-1e10<GREEN>) (<RESET>0xabcdef<GREEN>)<RESET> '<RED>x<RESET><GREEN>y<RESET>'
[<RED>a<RESET><GREEN>x<RESET>] <RED>a<RESET><GREEN>x<RESET>-><RED>b a<RESET><GREEN>y x<RESET>.<RED>b<RESET><GREEN>y<RESET>
!<RED>a<RESET><GREEN>x<RESET> ~<RED>a a<RESET><GREEN>x x<RESET>++ <RED>a<RESET><GREEN>x<RESET>-- <RED>a<RESET><GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>/<RED>b a<RESET><GREEN>y x<RESET>%<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>+<RED>b a<RESET><GREEN>y x<RESET>-<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<<RED>b a<RESET><GREEN>y x<RESET>>><RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<RED>b a<RESET><GREEN>y x<RESET><=<RED>b a<RESET><GREEN>y x<RESET>><RED>b a<RESET><GREEN>y x<RESET>>=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>==<RED>b a<RESET><GREEN>y x<RESET>!=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>^<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>|<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>||<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>?<RED>b<RESET><GREEN>y<RESET>:z
<RED>a<RESET><GREEN>x<RESET>=<RED>b a<RESET><GREEN>y x<RESET>+=<RED>b a<RESET><GREEN>y x<RESET>-=<RED>b a<RESET><GREEN>y x<RESET>*=<RED>b a<RESET><GREEN>y x<RESET>/=<RED>b a<RESET><GREEN>y x<RESET>%=<RED>b a<RESET><GREEN>y x<RESET><<=<RED>b a<RESET><GREEN>y x<RESET>>>=<RED>b a<RESET><GREEN>y x<RESET>&=<RED>b a<RESET><GREEN>y x<RESET>^=<RED>b a<RESET><GREEN>y x<RESET>|=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>,y
<RED>a<RESET><GREEN>x<RESET>::<RED>b<RESET><GREEN>y<RESET>

19
t/t4034/java/post

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
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

19
t/t4034/java/pre

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
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

35
t/t4034/objc/expect

@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 9106d63..dd5f421 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,18 +1,18 @@<RESET>
Foo() : x(0<RED>&&1<RESET><GREEN>&42<RESET>) { <GREEN>bar(x);<RESET> }
cout<<"Hello World<RED>!<RESET><GREEN>?<RESET>\n"<<endl;
<GREEN>(<RESET>1<GREEN>) (<RESET>-1e10<GREEN>) (<RESET>0xabcdef<GREEN>)<RESET> '<RED>x<RESET><GREEN>y<RESET>'
[<RED>a<RESET><GREEN>x<RESET>] <RED>a<RESET><GREEN>x<RESET>-><RED>b a<RESET><GREEN>y x<RESET>.<RED>b<RESET><GREEN>y<RESET>
!<RED>a<RESET><GREEN>x<RESET> ~<RED>a a<RESET><GREEN>x x<RESET>++ <RED>a<RESET><GREEN>x<RESET>-- <RED>a<RESET><GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>/<RED>b a<RESET><GREEN>y x<RESET>%<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>+<RED>b a<RESET><GREEN>y x<RESET>-<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<<RED>b a<RESET><GREEN>y x<RESET>>><RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<RED>b a<RESET><GREEN>y x<RESET><=<RED>b a<RESET><GREEN>y x<RESET>><RED>b a<RESET><GREEN>y x<RESET>>=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>==<RED>b a<RESET><GREEN>y x<RESET>!=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>^<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>|<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>||<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>?<RED>b<RESET><GREEN>y<RESET>:z
<RED>a<RESET><GREEN>x<RESET>=<RED>b a<RESET><GREEN>y x<RESET>+=<RED>b a<RESET><GREEN>y x<RESET>-=<RED>b a<RESET><GREEN>y x<RESET>*=<RED>b a<RESET><GREEN>y x<RESET>/=<RED>b a<RESET><GREEN>y x<RESET>%=<RED>b a<RESET><GREEN>y x<RESET><<=<RED>b a<RESET><GREEN>y x<RESET>>>=<RED>b a<RESET><GREEN>y x<RESET>&=<RED>b a<RESET><GREEN>y x<RESET>^=<RED>b a<RESET><GREEN>y x<RESET>|=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>,y

18
t/t4034/objc/post

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
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

18
t/t4034/objc/pre

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
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

35
t/t4034/pascal/expect

@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 077046c..8865e6b 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,18 +1,18 @@<RESET>
writeln("Hello World<RED>!<RESET><GREEN>?<RESET>");
<GREEN>(<RESET>1<GREEN>) (<RESET>-1e10<GREEN>) (<RESET>0xabcdef<GREEN>)<RESET> '<RED>x<RESET><GREEN>y<RESET>'
[<RED>a<RESET><GREEN>x<RESET>] <RED>a<RESET><GREEN>x<RESET>-><RED>b a<RESET><GREEN>y x<RESET>.<RED>b<RESET><GREEN>y<RESET>
!<RED>a<RESET><GREEN>x<RESET> ~<RED>a a<RESET><GREEN>x x<RESET>++ <RED>a<RESET><GREEN>x<RESET>-- <RED>a<RESET><GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>/<RED>b a<RESET><GREEN>y x<RESET>%<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>+<RED>b a<RESET><GREEN>y x<RESET>-<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<<RED>b a<RESET><GREEN>y x<RESET>>><RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<RED>b a<RESET><GREEN>y x<RESET><=<RED>b a<RESET><GREEN>y x<RESET>><RED>b a<RESET><GREEN>y x<RESET>>=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>==<RED>b a<RESET><GREEN>y x<RESET>!=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>^<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>|<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>||<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>?<RED>b<RESET><GREEN>y<RESET>:z
<RED>a<RESET><GREEN>x<RESET>=<RED>b a<RESET><GREEN>y x<RESET>+=<RED>b a<RESET><GREEN>y x<RESET>-=<RED>b a<RESET><GREEN>y x<RESET>*=<RED>b a<RESET><GREEN>y x<RESET>/=<RED>b a<RESET><GREEN>y x<RESET>%=<RED>b a<RESET><GREEN>y x<RESET><<=<RED>b a<RESET><GREEN>y x<RESET>>>=<RED>b a<RESET><GREEN>y x<RESET>&=<RED>b a<RESET><GREEN>y x<RESET>^=<RED>b a<RESET><GREEN>y x<RESET>|=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>,y
<RED>a<RESET><GREEN>x<RESET>::<RED>b<RESET><GREEN>y<RESET>

18
t/t4034/pascal/post

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
writeln("Hello World?");
(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

18
t/t4034/pascal/pre

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
writeln("Hello World!");
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

35
t/t4034/php/expect

@ -0,0 +1,35 @@ @@ -0,0 +1,35 @@
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index cf6e06b..4420a49 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,18 +1,18 @@<RESET>
<GREEN>(<RESET>$var<GREEN>)<RESET> $ var
<?="Hello World<RED>!<RESET><GREEN>?<RESET>"?>
<GREEN>(<RESET>1<GREEN>) (<RESET>-1e10<GREEN>) (<RESET>0xabcdef<GREEN>)<RESET> '<RED>x<RESET><GREEN>y<RESET>'
[<RED>a<RESET><GREEN>x<RESET>] <RED>a<RESET><GREEN>x<RESET>-><RED>b a<RESET><GREEN>y x<RESET>.<RED>b<RESET><GREEN>y<RESET>
!<RED>a<RESET><GREEN>x<RESET> ~<RED>a a<RESET><GREEN>x x<RESET>++ <RED>a<RESET><GREEN>x<RESET>-- <RED>a<RESET><GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>/<RED>b a<RESET><GREEN>y x<RESET>%<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>+<RED>b a<RESET><GREEN>y x<RESET>-<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<<RED>b a<RESET><GREEN>y x<RESET>>><RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<RED>b a<RESET><GREEN>y x<RESET><=<RED>b a<RESET><GREEN>y x<RESET>><RED>b a<RESET><GREEN>y x<RESET>>=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>==<RED>b a<RESET><GREEN>y x<RESET>!=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>^<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>|<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>||<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>?<RED>b<RESET><GREEN>y<RESET>:z
<RED>a<RESET><GREEN>x<RESET>=<RED>b a<RESET><GREEN>y x<RESET>+=<RED>b a<RESET><GREEN>y x<RESET>-=<RED>b a<RESET><GREEN>y x<RESET>*=<RED>b a<RESET><GREEN>y x<RESET>/=<RED>b a<RESET><GREEN>y x<RESET>%=<RED>b a<RESET><GREEN>y x<RESET><<=<RED>b a<RESET><GREEN>y x<RESET>>>=<RED>b a<RESET><GREEN>y x<RESET>&=<RED>b a<RESET><GREEN>y x<RESET>^=<RED>b a<RESET><GREEN>y x<RESET>|=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>,y

18
t/t4034/php/post

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
($var) $ var
<?="Hello World?"?>
(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

18
t/t4034/php/pre

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
$var $var
<?= "Hello World!" ?>
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

34
t/t4034/python/expect

@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 438f776..68baf34 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,17 +1,17 @@<RESET>
print<RED>u<RESET> "Hello World<RED>!<RESET><GREEN>?<RESET>\n"<GREEN>; print<RESET>
<GREEN>(<RESET>1<GREEN>) (<RESET>-1e10<GREEN>) (<RESET>0xabcdef<GREEN>) u<RESET>'<RED>x<RESET><GREEN>y<RESET>'
[<RED>a<RESET><GREEN>x<RESET>] <RED>a<RESET><GREEN>x<RESET>-><RED>b a<RESET><GREEN>y x<RESET>.<RED>b<RESET><GREEN>y<RESET>
!<RED>a<RESET><GREEN>x<RESET> ~<RED>a a<RESET><GREEN>x x<RESET>++ <RED>a<RESET><GREEN>x<RESET>-- <RED>a<RESET><GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>/<RED>b a<RESET><GREEN>y x<RESET>%<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>+<RED>b a<RESET><GREEN>y x<RESET>-<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<<RED>b a<RESET><GREEN>y x<RESET>>><RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<RED>b a<RESET><GREEN>y x<RESET><=<RED>b a<RESET><GREEN>y x<RESET>><RED>b a<RESET><GREEN>y x<RESET>>=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>==<RED>b a<RESET><GREEN>y x<RESET>!=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>^<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>|<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>||<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>?<RED>b<RESET><GREEN>y<RESET>:z
<RED>a<RESET><GREEN>x<RESET>=<RED>b a<RESET><GREEN>y x<RESET>+=<RED>b a<RESET><GREEN>y x<RESET>-=<RED>b a<RESET><GREEN>y x<RESET>*=<RED>b a<RESET><GREEN>y x<RESET>/=<RED>b a<RESET><GREEN>y x<RESET>%=<RED>b a<RESET><GREEN>y x<RESET><<=<RED>b a<RESET><GREEN>y x<RESET>>>=<RED>b a<RESET><GREEN>y x<RESET>&=<RED>b a<RESET><GREEN>y x<RESET>^=<RED>b a<RESET><GREEN>y x<RESET>|=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>,y

17
t/t4034/python/post

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
print "Hello World?\n"; print
(1) (-1e10) (0xabcdef) u'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

17
t/t4034/python/pre

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
print u"Hello World!\n"
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

34
t/t4034/ruby/expect

@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 30ed9a1..7678f14 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,17 +1,17 @@<RESET>
10.downto(1) {|<RED>x<RESET><GREEN>y<RESET>| puts <RED>x<RESET><GREEN>y<RESET>}
<GREEN>(<RESET>1<GREEN>) (<RESET>-1e10<GREEN>) (<RESET>0xabcdef<GREEN>)<RESET> '<RED>x<RESET><GREEN>y<RESET>'
[<RED>a<RESET><GREEN>x<RESET>] <RED>a<RESET><GREEN>x<RESET>-><RED>b a<RESET><GREEN>y x<RESET>.<RED>b<RESET><GREEN>y<RESET>
!<RED>a<RESET><GREEN>x<RESET> ~<RED>a a<RESET><GREEN>x x<RESET>++ <RED>a<RESET><GREEN>x<RESET>-- <RED>a<RESET><GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>*<RED>b a<RESET><GREEN>y x<RESET>/<RED>b a<RESET><GREEN>y x<RESET>%<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>+<RED>b a<RESET><GREEN>y x<RESET>-<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<<RED>b a<RESET><GREEN>y x<RESET>>><RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET><<RED>b a<RESET><GREEN>y x<RESET><=<RED>b a<RESET><GREEN>y x<RESET>><RED>b a<RESET><GREEN>y x<RESET>>=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>==<RED>b a<RESET><GREEN>y x<RESET>!=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>^<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>|<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>&&<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>||<RED>b<RESET>
<RED>a?b<RESET><GREEN>y<RESET>
<GREEN>x?y<RESET>:z
<RED>a<RESET><GREEN>x<RESET>=<RED>b a<RESET><GREEN>y x<RESET>+=<RED>b a<RESET><GREEN>y x<RESET>-=<RED>b a<RESET><GREEN>y x<RESET>*=<RED>b a<RESET><GREEN>y x<RESET>/=<RED>b a<RESET><GREEN>y x<RESET>%=<RED>b a<RESET><GREEN>y x<RESET><<=<RED>b a<RESET><GREEN>y x<RESET>>>=<RED>b a<RESET><GREEN>y x<RESET>&=<RED>b a<RESET><GREEN>y x<RESET>^=<RED>b a<RESET><GREEN>y x<RESET>|=<RED>b<RESET>
<RED>a<RESET><GREEN>y<RESET>
<GREEN>x<RESET>,y

17
t/t4034/ruby/post

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
10.downto(1) {|y| puts y}
(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

17
t/t4034/ruby/pre

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
10.downto(1) {|x| puts x}
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

9
t/t4034/tex/expect

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
<BOLD>diff --git a/pre b/post<RESET>
<BOLD>index 2b2dfcb..65cab61 100644<RESET>
<BOLD>--- a/pre<RESET>
<BOLD>+++ b/post<RESET>
<CYAN>@@ -1,4 +1,4 @@<RESET>
\section{Something <GREEN>new<RESET>}
<RED>\emph<RESET><GREEN>\textbf<RESET>{Macro style}
{<RED>\em<RESET><GREEN>\bfseries<RESET> State toggle style}
\\[<RED>1em<RESET><GREEN>1cm<RESET>]

4
t/t4034/tex/post

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
\section{Something new}
\textbf{Macro style}
{\bfseries State toggle style}
\\[1cm]

4
t/t4034/tex/pre

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
\section{Something}
\emph{Macro style}
{\em State toggle style}
\\[1em]
Loading…
Cancel
Save