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
