NAME=PE: corkami imports.exe - open
FILE=bins/pe/imports.exe
CMDS=<<EOF
ii
is
?v sym.imp.msvcrt.dll_printf
EOF
EXPECT=<<EOF
[Imports]
nth vaddr      bind type lib          name
------------------------------------------
1   0x004010c0 NONE FUNC kernel32.dll ExitProcess
1   0x004010c8 NONE FUNC msvcrt.dll   printf

[Symbols]

nth paddr       vaddr      bind type size lib          name
-----------------------------------------------------------
1    0x000002c0 0x004010c0 NONE FUNC 0    kernel32.dll imp.ExitProcess
1    0x000002c8 0x004010c8 NONE FUNC 0    msvcrt.dll   imp.printf
0x4010c8
EOF
RUN


NAME=PE: corkami imports.exe - json output
FILE=bins/pe/imports.exe
CMDS=iij~{}   
EXPECT=<<EOF
[
  {
    "ordinal": 1,
    "bind": "NONE",
    "type": "FUNC",
    "name": "ExitProcess",
    "libname": "kernel32.dll",
    "plt": 4198592
  },
  {
    "ordinal": 1,
    "bind": "NONE",
    "type": "FUNC",
    "name": "printf",
    "libname": "msvcrt.dll",
    "plt": 4198600
  }
]
EOF
RUN
