NAME=loading an xbe file
FILE=bins/xbe/default.xbe
CMDS=q!
EXPECT=<<EOF
EOF
RUN

NAME=entrypoint decoding
FILE=bins/xbe/default.xbe
CMDS=ie~addr
EXPECT=<<EOF
vaddr=0x00011000 paddr=0x00001000 haddr=-1 type=program
EOF
RUN

NAME=corrupted section data
FILE=bins/xbe/default.xbe
CMDS=p8 16
EXPECT=<<EOF
81ec08040000535556576a01e88f0100
EOF
RUN

NAME=decoding the thunk table
FILE=bins/xbe/default.xbe
CMDS=is
EXPECT=<<EOF
[Symbols]

nth paddr       vaddr      bind type size lib name
--------------------------------------------------
0    0x000016c0 0x000116c0 NONE NONE 4        kt.sprintf
EOF
RUN

NAME=section header decoding
BROKEN=1
FILE=bins/xbe/default.xbe
CMDS=iS
EXPECT=<<EOF
[Sections]
00 0x00001000  1728 0x00011000  1728 -r-x .0
01 0x00002000    24 0x000116c0    24 -r-- .1
02 0x00003000 28280 0x000116e0 1257188 -rw- .2
03 0x0000a000    60 0x001445e0    64 -rwx .3
04 0x0000b000   164 0x00144620  1188 -r-- .4
EOF
RUN

NAME=section header in r2
BROKEN=1
FILE=bins/xbe/default.xbe
CMDS=S
EXPECT=<<EOF
[00:00] * pa=0x00001000 r-x va=0x00011000 sz=0x06c0 vsz=0x06c0 .0
[00:01] . pa=0x00002000 r-- va=0x000116c0 sz=0x0018 vsz=0x0018 .1
[00:02] . pa=0x00003000 rw- va=0x000116e0 sz=0x6e78 vsz=0x132ee4 .2
[00:03] . pa=0x0000a000 rwx va=0x001445e0 sz=0x003c vsz=0x0040 .3
[00:04] . pa=0x0000b000 r-- va=0x00144620 sz=0x00a4 vsz=0x04a4 .4
EOF
RUN

NAME=loading crashy xbe file
FILE=bins/xbe/crash.xbe
CMDS=q!
EXPECT=<<EOF
EOF
RUN
