mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-30 16:40:57 +00:00
074f027fd3
Add a new test: db/cmd/cmds hash comment and simple quote Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
177 lines
1.9 KiB
Plaintext
177 lines
1.9 KiB
Plaintext
NAME=quotes multicommands
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
"wa nop;nop";pi 3
|
|
EOF
|
|
EXPECT=<<EOF
|
|
nop
|
|
nop
|
|
add byte [rax], al
|
|
EOF
|
|
RUN
|
|
|
|
NAME=quotes multicommands 2
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
p8 1;"wa nop;nop";pi 3
|
|
EOF
|
|
EXPECT=<<EOF
|
|
00
|
|
nop
|
|
nop
|
|
add byte [eax], al
|
|
EOF
|
|
RUN
|
|
|
|
NAME=quotes multicommands 2
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
"w hello;world";"wa inc eax;inc eax";psz
|
|
EOF
|
|
EXPECT=<<EOF
|
|
@@llo;world
|
|
EOF
|
|
RUN
|
|
|
|
NAME=p8 2@x:9090
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
p8 2 @x:9090
|
|
EOF
|
|
EXPECT=<<EOF
|
|
9090
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pi 2@x:9090
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
pi 2 @x:9090
|
|
EOF
|
|
EXPECT=<<EOF
|
|
nop
|
|
nop
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pdi 2@x:9090@0x1000
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
pdi 2 @x:9090@0x1000
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00001000 90 nop
|
|
0x00001001 90 nop
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pd 2@x:9090
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
pd 2 @x:9090
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000000 90 nop
|
|
0x00000001 90 nop
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pad 9090
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
pad 9090
|
|
EOF
|
|
EXPECT=<<EOF
|
|
nop
|
|
nop
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pie 90
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
wx 4989d1
|
|
pie 1
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000000 rdx,r9,=
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pa nop,nop
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
"pa nop;nop"
|
|
EOF
|
|
EXPECT=<<EOF
|
|
9090
|
|
EOF
|
|
RUN
|
|
|
|
NAME=r2 asm with pa
|
|
FILE=-
|
|
BROKEN=1
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
f TEST=33
|
|
pa mov eax, TEST
|
|
EOF
|
|
EXPECT=<<EOF
|
|
b821000000
|
|
EOF
|
|
RUN
|
|
|
|
NAME=r2 asm with pa
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
f TEST=33
|
|
pa mov eax, 33
|
|
EOF
|
|
EXPECT=<<EOF
|
|
b821000000
|
|
EOF
|
|
RUN
|
|
|
|
NAME=hash comment and double quote
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
?? # ;o"
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0
|
|
EOF
|
|
RUN
|
|
|
|
NAME=hash comment and simple quote
|
|
FILE=-
|
|
CMDS=<<EOF
|
|
?e 'before # after'
|
|
EOF
|
|
EXPECT=<<EOF
|
|
before # after
|
|
EOF
|
|
RUN
|