mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08:00
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>
This commit is contained in:
parent
adf872e783
commit
8d96e7288f
@ -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
Normal file
15
t/t4034/bibtex/expect
Normal file
@ -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
Normal file
10
t/t4034/bibtex/post
Normal file
@ -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
Normal file
9
t/t4034/bibtex/pre
Normal file
@ -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
Normal file
36
t/t4034/cpp/expect
Normal file
@ -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
Normal file
19
t/t4034/cpp/post
Normal file
@ -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
Normal file
19
t/t4034/cpp/pre
Normal file
@ -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
Normal file
35
t/t4034/csharp/expect
Normal file
@ -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
Normal file
18
t/t4034/csharp/post
Normal file
@ -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
Normal file
18
t/t4034/csharp/pre
Normal file
@ -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
Normal file
10
t/t4034/fortran/expect
Normal file
@ -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
Normal file
5
t/t4034/fortran/post
Normal file
@ -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
Normal file
5
t/t4034/fortran/pre
Normal file
@ -0,0 +1,5 @@
|
||||
print *, "Hello World!"
|
||||
|
||||
DO10I = 1,10
|
||||
DO10I = 1,10
|
||||
DO10I = 1,10
|
8
t/t4034/html/expect
Normal file
8
t/t4034/html/expect
Normal file
@ -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
Normal file
3
t/t4034/html/post
Normal file
@ -0,0 +1,3 @@
|
||||
<tag newattr="newvalue">added content</tag>
|
||||
<tag attr="newvalue">changed</tag>
|
||||
<newtag>content &newentity;</newtag>
|
3
t/t4034/html/pre
Normal file
3
t/t4034/html/pre
Normal file
@ -0,0 +1,3 @@
|
||||
<tag>content</tag>
|
||||
<tag attr="value">content</tag>
|
||||
<tag>content &entity;</tag>
|
36
t/t4034/java/expect
Normal file
36
t/t4034/java/expect
Normal file
@ -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
Normal file
19
t/t4034/java/post
Normal file
@ -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
Normal file
19
t/t4034/java/pre
Normal file
@ -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
Normal file
35
t/t4034/objc/expect
Normal file
@ -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
Normal file
18
t/t4034/objc/post
Normal file
@ -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
Normal file
18
t/t4034/objc/pre
Normal file
@ -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
Normal file
35
t/t4034/pascal/expect
Normal file
@ -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
Normal file
18
t/t4034/pascal/post
Normal file
@ -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
Normal file
18
t/t4034/pascal/pre
Normal file
@ -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
Normal file
35
t/t4034/php/expect
Normal file
@ -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
Normal file
18
t/t4034/php/post
Normal file
@ -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
Normal file
18
t/t4034/php/pre
Normal file
@ -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
Normal file
34
t/t4034/python/expect
Normal file
@ -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
Normal file
17
t/t4034/python/post
Normal file
@ -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
Normal file
17
t/t4034/python/pre
Normal file
@ -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
Normal file
34
t/t4034/ruby/expect
Normal file
@ -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
Normal file
17
t/t4034/ruby/post
Normal file
@ -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
Normal file
17
t/t4034/ruby/pre
Normal file
@ -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
Normal file
9
t/t4034/tex/expect
Normal file
@ -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
Normal file
4
t/t4034/tex/post
Normal file
@ -0,0 +1,4 @@
|
||||
\section{Something new}
|
||||
\textbf{Macro style}
|
||||
{\bfseries State toggle style}
|
||||
\\[1cm]
|
4
t/t4034/tex/pre
Normal file
4
t/t4034/tex/pre
Normal file
@ -0,0 +1,4 @@
|
||||
\section{Something}
|
||||
\emph{Macro style}
|
||||
{\em State toggle style}
|
||||
\\[1em]
|
Loading…
Reference in New Issue
Block a user