NAME=pD -10 @ 10
FILE=malloc://512
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e asm.bytes=true
e analysis.hasnext=0
wx b8010000004839ca7f00
pD -10 @ 0xa
EOF
EXPECT=<<EOF
            0x00000000      b801000000     mov   eax, 1
            0x00000005      4839ca         cmp   rdx, rcx
        ,=< 0x00000008      7f00           jg    0xa
EOF
RUN

NAME=pD -10 @ 0
FILE=malloc://512
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e asm.bytes=true
e analysis.hasnext=0
wx b8010000004839ca7f00
pD -10 @ 10
EOF
EXPECT=<<EOF
            0x00000000      b801000000     mov   eax, 1
            0x00000005      4839ca         cmp   rdx, rcx
        ,=< 0x00000008      7f00           jg    0xa
EOF
RUN

NAME=pD 5 @ 0
FILE=malloc://512
CMDS=<<EOF
e asm.arch=x86
e asm.bytes=true
e asm.bits=64
e analysis.hasnext=0
wx b8010000004839ca7f00
pD 5
EOF
EXPECT=<<EOF
            0x00000000      b801000000     mov   eax, 1
EOF
RUN

NAME=pDj 5 @ 0
FILE=malloc://512
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e analysis.hasnext=0
wx b8010000004839ca7f00
pDj 5 @ 0
EOF
EXPECT=<<EOF
[{"offset":0,"val":1,"esil":"1,rax,=","refptr":false,"fcn_addr":0,"fcn_last":0,"size":5,"opcode":"mov eax, 1","disasm":"mov eax, 1","bytes":"b801000000","family":"cpu","type":"mov","reloc":false,"type_num":9,"type2_num":0}]
EOF
RUN

NAME=pD -10
FILE=malloc://1024
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e asm.bytes=true
wx 90909090909090909090 ; s 10 ; pD -10
EOF
EXPECT=<<EOF
            0x00000000      90             nop
            0x00000001      90             nop
            0x00000002      90             nop
            0x00000003      90             nop
            0x00000004      90             nop
            0x00000005      90             nop
            0x00000006      90             nop
            0x00000007      90             nop
            0x00000008      90             nop
            0x00000009      90             nop
EOF
RUN
