NAME=nro detection
FILE=bins/nro/appstore.nro
CMDS=iI~?switch
EXPECT=<<EOF
1
EOF
RUN


NAME=nro sections
FILE=bins/nro/appstore.nro
ARGS=-e io.cache=true
CMDS=iS
EXPECT=<<EOF
[Sections]

nth paddr           size vaddr          vsize perm name
-------------------------------------------------------
0   0x00000000      0x80 0x00000000      0x80 -r-- header
1   0x0021d000       0x0 0x0021d000       0x0 -r-- sig0
2   0x00000000  0x1b4000 0x00000000  0x1b4000 -r-x text
3   0x001b4000   0x5a000 0x001b4000   0x5a000 -r-- ro
4   0x0020e000    0xf000 0x0020e000    0xf000 -rw- data

EOF
RUN

NAME=nro entry
FILE=bins/nro/appstore.nro
ARGS=-e io.cache=true
CMDS=ie
EXPECT=<<EOF
[Entrypoints]
vaddr=0x00000080 paddr=0x00000080 haddr=-1 type=program

1 entrypoints
EOF
RUN

NAME=nro data
FILE=bins/nro/appstore.nro
ARGS=-e io.cache=true
CMDS=p8 0x30 @ 0x80
EXPECT=<<EOF
fb031eaa01000094dc2302d1f90300aafa0301aae0100090c11100d00000199121e02191210000cb211c009121f07d92
EOF
RUN
