rizin/test/db/cmd/cmds
Aswin C d42cde8ca5
Disable asm.bytes by default ##cons (#155)
* Disable `asm.bytes` by default

* Fix tests by adding `e asm.bytes=true` (1/n)

* Fix tests by adding  (2/n)

* Fix tests by adding `e asm.bytes=true` (3/n)

* Fix tests by adding `asm.bytes=true` (4/n)

* Fix test by adding `asm.bytes=true` (5/n)

* Fix mostly all broken tests

* Attemp to fix the rzpipe test

* Attempt to fix the tests in `db/cmd/cmd_pipe`

* Fix tests again

* Fix cmd_pipe test

* Add a test where `asm.bytes` is false

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2020-12-15 12:47:33 +01:00

158 lines
1.8 KiB
Text

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.bytes=true
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.bytes=true
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