NAME=Modules from PDB
FILE=
CMDS=<<EOF
idpi bins/pdb/Project1.pdb~:..30
EOF
EXPECT=<<EOF
modules:
* Linker Generated Manifest RES *
C:\Users\inisider\documents\visual studio 2012\Projects\Project1\Project1\Debug\Source.obj
KERNEL32.dll
Import:KERNEL32.dll
F:\dd\vctools\crt_bld\SELF_X86\crt\src\INTEL\xdll_lib\unhandld.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\atonexit.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\cinitexe.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\crtexe.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\dllargv.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\gs_cookie.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\gs_report.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\gs_support.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\merr.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\natstart.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\pesect.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\wildcard.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\asm\dllsupp.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\INTEL\xdll_lib\chandler4gs.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\fp8.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\loadcfg.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\secchk.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\_newmode.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\xncommod.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\xtxtmode.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\src\build\INTEL\xdll_obj\nativec\xthdloc.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\prebuild\build\INTEL\xdll_obj\rtc\nativecpp\\userapi.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\prebuild\build\INTEL\xdll_obj\rtc\nativecpp\\stack.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\prebuild\build\INTEL\xdll_obj\rtc\nativecpp\\pdblkup.obj
F:\dd\vctools\crt_bld\SELF_X86\crt\prebuild\build\INTEL\xdll_obj\rtc\nativecpp\\initsect.obj
EOF
RUN

NAME=Load global variables from PDB
FILE=
CMDS=<<EOF
idp bins/pdb/Project1.pdb
avg
EOF
EXPECT=<<EOF
global struct IMAGE_LOAD_CONFIG_DIRECTORY32_2 _load_config_used @ 0x165b0
global int32_t (*type_0x1450)(char *arg0, const char *arg1) wsprintffp @ 0x1815c
global void (*type_0x1093)() [4] __rtc_izz @ 0x16ae8
global wchar_t [26] mspdbName @ 0x1640c
global char ** argv @ 0x18140
global void (**type_0x1093)() __onexitbegin @ 0x1856c
global uint32_t __security_cookie @ 0x18024
global void (*type_0x1093)() [4] __rtc_iaa @ 0x168e0
global int32_t __defaultmatherr @ 0x18018
global void * __native_startup_lock @ 0x18548
global int32_t has_cctor @ 0x18138
global int32_t __native_startup_state @ 0x18558
global uint32_t __native_dllmain_reason @ 0x18020
global int32_t _dowildcard @ 0x18170
global struct _EXCEPTION_RECORD GS_ExceptionRecord @ 0x18188
global void (*type_0x1093)() [4] __xc_a @ 0x15000
global void (*type_0x1093)() [4] __xi_a @ 0x1530c
global bool init @ 0x18130
global int32_t argret @ 0x18148
global int32_t argc @ 0x1813c
global int32_t (*type_0x1028)() pinit @ 0x15514
global wchar_t [8] dllExt @ 0x1654c
global int32_t managedapp @ 0x1814c
global struct HINSTANCE__ * mspdb @ 0x1817c
global void (*type_0x1093)() [4] __xi_z @ 0x1571c
global struct _EXCEPTION_POINTERS GS_ExceptionPointers @ 0x165a0
global int32_t __globallocalestatus @ 0x1801c
global int32_t _commode @ 0x1816c
global int32_t DebuggerWasPresent @ 0x184a4
global void (*type_0x1093)() pcppinit @ 0x15104
global int32_t _newmode @ 0x18174
global int32_t mainret @ 0x18134
global void (*type_0x1093)() [4] __xc_z @ 0x15208
global int32_t [20] _RTC_ErrorLevels @ 0x18000
global int32_t (*type_0x1028)() (*type_0x1097)(int32_t (*type_0x1028)()) _imp___onexit @ 0x19248
global int32_t (*type_0x1028)() pcinit @ 0x15410
global const char *[20] _RTC_errlist @ 0x16034
global int32_t * _imp___commode @ 0x1927c
global uint32_t __security_cookie_complement @ 0x18028
global int32_t _fmode @ 0x18178
global struct _startupinfo startinfo @ 0x18150
global int32_t (*type_0x1141)(int32_t arg0, const char *arg1, int32_t arg2, const char *arg3, const char *arg4) _RTC_ErrorReportFunc @ 0x18160
global const char *[24] _RTC_ErrorMessages @ 0x1594c
global int32_t * _imp___fmode @ 0x19280
global void (*type_0x1093)() [4] __rtc_tzz @ 0x16df4
global void (**type_0x1093)() __onexitend @ 0x1855c
global void (*type_0x1093)() [4] __rtc_taa @ 0x16bec
EOF
RUN

NAME=xrefs to global variables from PDB
FILE=bins/pdb/exceptions-test.exe
CMDS=<<EOF
idp
aaa
avg
echo ---
avgx __guard_check_icall_fptr
pd 3 @ 0x140007344
avgx __scrt_debugger_hook_flag
pdr @ fcn.140001366
avgx __dyn_tls_init_callback
pdr @ fcn.140001316
EOF
EXPECT=<<EOF
global int32_t (*type_0x1d02)(int32_t arg0, wchar_t *arg1, int32_t arg2, wchar_t *arg3, wchar_t *arg4) _RTC_ErrorReportFuncW @ 0x140011490
global int32_t __isa_available @ 0x140011038
global unsigned char $xdatasym @ 0x14000ff40
global const unsigned char _guard_xfg_dispatch_icall_nop @ 0x140009aa0
global struct _EXCEPTION_POINTERS GS_ExceptionPointers @ 0x14000e060
global bool module_local_atexit_table_initialized @ 0x140011b39
global uint64_t __security_cookie @ 0x140011008
global void * __guard_dispatch_icall_fptr @ 0x140015020
global void (*type_0x1001)() [24] std::runtime_error::`vftable' @ 0x14000d808
global const int32_t __scrt_ucrt_dll_is_in_use @ 0x140011060
global void (*type_0x1001)() [24] std::exception::`vftable' @ 0x14000d530
global void (*type_0x1de8)(void *arg0, uint32_t arg1, void *arg2) __dyn_tls_dtor_callback @ 0x140011bc8
global int64_t __memset_nt_iters @ 0x140011048
global int32_t (*type_0x1015)() pre_c_initializer @ 0x14000c440
global void (*type_0x1001)() [8] __xp_z @ 0x14000c880
global void (*type_0x1001)() [8] __xc_a @ 0x14000c000
global struct _onexit_table_t module_local_at_quick_exit_table @ 0x140011b58
global int32_t __isa_enabled @ 0x14001103c
global int32_t __scrt_default_matherr @ 0x140011034
global struct HINSTANCE__ * mspdb @ 0x140011bb8
global void * __scrt_native_startup_lock @ 0x140011b30
global void (*type_0x1001)() [8] __xp_a @ 0x14000c770
global void (*type_0x1001)() [8] __rtc_taa @ 0x14000f0b8
global const char [15] uninit_premsg @ 0x14000d8d0
global const char [43] uninit_postmsg @ 0x14000d8e0
global bool PDBOK @ 0x140011bc2
global int64_t __memcpy_nt_iters @ 0x140011040
global int32_t [20] _RTC_ErrorLevels @ 0x140011018
global void (*type_0x1001)() [8] __rtc_tzz @ 0x14000f2d8
global const char *[40] _RTC_errlist @ 0x14000df58
global void * __guard_xfg_dispatch_icall_fptr @ 0x140015030
global bool is_initialized_as_dll @ 0x140011b38
global void * __guard_xfg_table_dispatch_icall_fptr @ 0x140015040
global void (*type_0x1001)() [8] __rtc_iaa @ 0x14000ed88
global struct _onexit_table_t module_local_atexit_table @ 0x140011b40
global wchar_t [46] mspdbName @ 0x14000e078
global bool init @ 0x140011470
global void (*type_0x1001)() [8] __xt_z @ 0x14000caa0
global void (*type_0x1001)() pre_cpp_initializer @ 0x14000c110
global struct _RS5_IMAGE_LOAD_CONFIG_DIRECTORY64 _load_config_used @ 0x14000e2d0
global struct __type_info_node __type_info_root_node @ 0x140011b80
global void * __guard_check_icall_fptr @ 0x140015000
global void (*type_0x1001)() [8] __xc_z @ 0x14000c220
global bool alreadyTried @ 0x140011bc1
global void (*type_0x1001)() [8] __rtc_izz @ 0x14000efa8
global void (*type_0x1079)(void *arg0) __castguard_check_failure_os_handled_fptr @ 0x140011ba8
global struct _EXCEPTION_RECORD GS_ExceptionRecord @ 0x1400114a0
global int32_t (*type_0x1015)() [8] __xi_a @ 0x14000c330
global void (*type_0x1001)() [8] __xt_a @ 0x14000c990
global const unsigned char _guard_dispatch_icall_nop @ 0x140009a80
global int32_t __scrt_debugger_hook_flag @ 0x140011ba4
global int32_t (*type_0x1015)() [8] __xi_z @ 0x14000c660
global int32_t __scrt_current_native_startup_state @ 0x140011b28
global void (*type_0x1de8)(void *arg0, uint32_t arg1, void *arg2) __dyn_tls_init_callback @ 0x140011be0
global uint64_t _OptionsStorage @ 0x140011478
global wchar_t [8] dllExt @ 0x14000e240
global int32_t (*type_0x1d1a)(int32_t arg0, const char *arg1, int32_t arg2, const char *arg3, const char *arg4) _RTC_ErrorReportFunc @ 0x140011488
global int32_t (*type_0x1015)() post_pgo_initializer @ 0x14000c550
global void * __CastGuardVftablesStart @ 0x14000e600
global int32_t __favor @ 0x140011bc4
global void * __CastGuardVftablesEnd @ 0x14000e710
global uint64_t __security_cookie_complement @ 0x140011000
global void * __guard_xfg_check_icall_fptr @ 0x140015010
---
(nofunc) 0x140007344 [DATA] lea rcx, pdb.exceptions_test.__guard_check_icall_fptr
            0x140007344      lea   rcx, pdb.exceptions_test.__guard_check_icall_fptr ; 0x140015000
            0x14000734b      call  fcn.1400011db
            0x140007350      lea   rcx, [0x14000101e]
fcn.140001366 0x140006a64 [DATA] mov dword [pdb.exceptions_test.__scrt_debugger_hook_flag], 0
  ; CALL XREFS from fcn.140001398 @ 0x140006aab, 0x140006c04
/ fcn.140001366(int64_t arg1);
| ; arg int64_t arg1 @ rcx
| ; var int64_t var_8h @ stack + 0x8
| 0x140001366      jmp   pdb.exceptions_test.__crt_debugger_hook
| ----------- true: 0x140006a60
| ; CODE XREF from fcn.140001366 @ 0x140001366
| ;-- __crt_debugger_hook:
| 0x140006a60      mov   dword [var_8h], ecx                           ; arg1
| 0x140006a64      mov   dword [pdb.exceptions_test.__scrt_debugger_hook_flag], 0 ; [0x140011ba4:4]=0
\ 0x140006a6e      ret

fcn.140001316 0x140006a40 [DATA] lea rax, pdb.exceptions_test.__dyn_tls_init_callback
  ; CALL XREF from fcn.1400049a0 @ 0x140004a44
/ fcn.140001316();
| 0x140001316      jmp   pdb.exceptions_test.__scrt_get_dyn_tls_init_callback
| ----------- true: 0x140006a40
| ; CODE XREF from fcn.140001316 @ 0x140001316
| ;-- __scrt_get_dyn_tls_init_callback:
| 0x140006a40      lea   rax, pdb.exceptions_test.__dyn_tls_init_callback ; 0x140011be0
\ 0x140006a47      ret

EOF
RUN

NAME=PDB downloader check
FILE=bins/pdb/user32.dll
CMDS=<<EOF
env RZ_CURL=1
e pdb.server=https://raw.githubusercontent.com/rizinorg/test-pdb-repository/main/
!!rz-bin -PP ${RZ_FILE} ~PDB
EOF
EXPECT=<<EOF
PDB "user32.pdb" download success
EOF
RUN

NAME=PDB downloader json
FILE==
CMDS=<<EOF
env RZ_CURL=1
e pdb.server=https://raw.githubusercontent.com/rizinorg/test-pdb-repository/main/
!rz-bin -PPj bins/pdb/user32.dll~{}>$pdb
$pdb~file,guid,download
EOF
EXPECT=<<EOF
    "file": "user32.pdb",
    "guid": "15F778B3671D4EFDBDCDE79905308B792",
    "download": true
EOF
RUN

NAME=idpdj
FILE=bins/pdb/user32.dll
CMDS=<<EOF
env RZ_CURL=1
e pdb.server=https://raw.githubusercontent.com/rizinorg/test-pdb-repository/main/
idpdj~{}>$pdb
$pdb~file,guid,download
EOF
EXPECT=<<EOF
    "file": "user32.pdb",
    "guid": "15F778B3671D4EFDBDCDE79905308B792",
    "download": true
EOF
RUN

NAME=idp 404
FILE==
CMDS=<<EOF
idp 404.pdb
EOF
EXPECT=
EXPECT_ERR=<<EOF
ERROR: Cannot open file '404.pdb'
EOF
RUN

NAME=idp and baddr
FILE==
CMDS=<<EOF
e bin.baddr=0
idp bins/pdb/Project1.pdb
fl~__enc_textbss_end
e bin.baddr=0x800000
idp bins/pdb/Project1.pdb
fl~__enc_textbss_end
EOF
EXPECT=<<EOF
0x00011000 0 pdb.Project1.__enc_textbss_end
0x00811000 0 pdb.Project1.__enc_textbss_end
EOF
RUN

NAME=find structure R2_TEST_STRUCT
FILE=bins/pdb/Project1.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -ao R2_TEST_STRUCT
EXPECT=<<EOF
R2_TEST_STRUCT
EOF
RUN

NAME=find class CTest2 # has LF_BCLASS
FILE=bins/pdb/vs2019_cpp_override.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -ao "struct CTest2"
EXPECT=<<EOF
struct CTest2
EOF
BROKEN=1
RUN

NAME=find class _onexit_table_t # LF_STRUCTURE_19
FILE=bins/pdb/vs2019_cpp_override.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -ao _onexit_table_t
EXPECT=<<EOF
_onexit_table_t
EOF
RUN

NAME=find union R2_TEST_UNION
FILE=bins/pdb/Project1.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -ao R2_TEST_UNION
EXPECT=<<EOF
R2_TEST_UNION
EOF
RUN

NAME=find enum R2_TEST_ENUM
FILE=bins/pdb/Project1.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -ao R2_TEST_ENUM
EXPECT=<<EOF
R2_TEST_ENUM
EOF
RUN

NAME=find enum _RTC_ErrorNumber
FILE=bins/pdb/vs2019_cpp_override.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -ao _RTC_ErrorNumber
EXPECT=<<EOF
_RTC_ErrorNumber
EOF
RUN

NAME=find enum member of _RTC_ErrorNumber
FILE=bins/pdb/vs2019_cpp_override.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -ao _RTC_ILLEGAL
EXPECT=<<EOF
_RTC_ILLEGAL
EOF
RUN

NAME=member1 name of structure R2_TEST_STRUCT
FILE=bins/pdb/Project1.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -ao r2_struct_var_1
EXPECT=<<EOF
r2_struct_var_1
EOF
RUN

NAME=member1 of structure _onexit_table_t # LF_STRUCTURE_19
FILE=bins/pdb/vs2019_cpp_override.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -ao "void\ (\*\*_first)();"
EXPECT=<<EOF
void (**_first)();
EOF
RUN

NAME=member2 name of structure R2_TEST_STRUCT
FILE=bins/pdb/Project1.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -ao r2_struct_var_2
EXPECT=<<EOF
r2_struct_var_2
EOF
RUN

NAME=member1 type of structure R2_TEST_STRUCT
FILE=bins/pdb/Project1.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep r2_struct_var_1 | grep -ao int32_t
EXPECT=<<EOF
int32_t
EOF
RUN

NAME=member2 type of structure R2_TEST_STRUCT
FILE=bins/pdb/Project1.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep r2_struct_var_2 | grep -ao int16_t
EXPECT=<<EOF
int16_t
EOF
RUN

NAME=member1 name of union R2_TEST_UNION
FILE=bins/pdb/Project1.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -ao r2_union_var_1
EXPECT=<<EOF
r2_union_var_1
EOF
RUN

NAME=member2 name of union R2_TEST_UNION
FILE=bins/pdb/Project1.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -ao r2_union_var_2
EXPECT=<<EOF
r2_union_var_2
EOF
RUN

NAME=member1 type of union R2_TEST_UNION
FILE=bins/pdb/Project1.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep r2_union_var_1 | grep -ao int32_t
EXPECT=<<EOF
int32_t
EOF
RUN

NAME=member2 type of union R2_TEST_UNION
FILE=bins/pdb/Project1.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep r2_union_var_2 | grep -ao double
EXPECT=<<EOF
double
EOF
RUN

NAME=GUID CHECK
FILE=bins/pdb/user32.dll
CMDS=!rz-bin -I ${RZ_FILE} | grep -ao 15F778B3671D4EFDBDCDE79905308B792
EXPECT=<<EOF
15F778B3671D4EFDBDCDE79905308B792
EOF
RUN

NAME=PDB set flag realname
FILE==
CMDS=<<EOF
idp bins/pdb/Project1.pdb
fN @ 0x00011000
EOF
EXPECT=<<EOF
__enc$textbss$end
EOF
RUN

NAME=member1 type of struct _CONSOLE_READCONSOLE_CONTROL of arm PDB
FILE=bins/pe/hello_world_arm/hello_world_arm_ZiZoO2.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -C2 _CONSOLE_READCONSOLE_CONTROL | grep nLength | grep -ao uint32_t
EXPECT=<<EOF
uint32_t
EOF
RUN

NAME=member1 name of struct _CONSOLE_READCONSOLE_CONTROL of arm PDB
FILE=bins/pe/hello_world_arm/hello_world_arm_ZiZoO2.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep -C2 _CONSOLE_READCONSOLE_CONTROL | grep -ao nLength
EXPECT=<<EOF
nLength
EOF
RUN

NAME=member value of enum __acrt_fenv_machine_arm_control of arm PDB
FILE=bins/pe/hello_world_arm/hello_world_arm_ZiZoO2.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep all_control_bits | grep -ao 0x3c09f00
EXPECT=<<EOF
0x3c09f00
EOF
RUN

NAME=enum __acrt_fenv_abstract_status of arm PDB
FILE=bins/pe/hello_world_arm/hello_world_arm_ZiZoO2.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep "__acrt_fenv_abstract_status {"
EXPECT=<<EOF
enum __acrt_fenv_abstract_status {
EOF
RUN

NAME=symbol _towlower_internal of arm PDB
FILE=bins/pe/hello_world_arm/hello_world_arm_ZiZoO2.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep "_towlower_internal"
EXPECT=<<EOF
0x00066da4  4366  .text  _towlower_internal
EOF
RUN

NAME=complex symbol of arm PDB
FILE=bins/pe/hello_world_arm/hello_world_arm_ZiZoO2.pdb
CMDS=!rz-bin -P ${RZ_FILE} | grep "south africa"
EXPECT=<<EOF
0x000820c4  4366  .rdata  `string'::1484532236::"south africa"
EOF
RUN

NAME=LF_INDEX parsing
FILE=bins/pdb/exceptions-test.exe
CMDS=<<EOF
idp
te CV_HREG_e~?
EOF
EXPECT=<<EOF
3218
EOF
RUN

NAME=Type redefinition
FILE=bins/pdb/exceptions-test.exe
CMDS=<<EOF
tsc _NT_TIB
idp
tsc _NT_TIB
tsc _TP_CALLBACK_ENVIRON_V3
EOF
EXPECT=<<EOF
struct _NT_TIB {
	struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
	void *StackBase;
	void *StackLimit;
	void *SubSystemTib;
	unsigned long Version;
	void *ArbitraryUserPointer;
	struct _NT_TIB *Self;
};
struct _NT_TIB {
	struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
	void *StackBase;
	void *StackLimit;
	void *SubSystemTib;
	void *FiberData;
	uint32_t Version;
	void *ArbitraryUserPointer;
	struct _NT_TIB *Self;
};
struct _TP_CALLBACK_ENVIRON_V3 {
	uint32_t Version;
	struct _TP_POOL *Pool;
	struct _TP_CLEANUP_GROUP *CleanupGroup;
	void (*CleanupGroupCancelCallback)(void *arg0, void *arg1);
	void *RaceDll;
	struct _ACTIVATION_CONTEXT *ActivationContext;
	void (*FinalizationCallback)(struct _TP_CALLBACK_INSTANCE *arg0, void *arg1);
	union type_0x1e89 u;
	int32_t CallbackPriority;
	uint32_t Size;
};
EOF
RUN

NAME=Extract pdb via idbx
FILE==
CMDS=<<EOF
idpi bins/pdb/basic32.pd_
e log.level=3
mkdir .tmp
idpx bins/pdb/basic32.pd_ .tmp
!rz-hash -a md5 .tmp/basic32.pdb
EOF
REGEXP_FILTER_ERR=(ERROR:.+\nINFO:.+)
EXPECT_ERR=<<EOF
ERROR: The pdb file bins/pdb/basic32.pd_ seems to be compressed, please use idpx command to extract the contents.
INFO: cab_extract: extracted .tmp/basic32.pdb
EOF
EXPECT=<<EOF
.tmp/basic32.pdb: 0x00000000-0x00649000 md5: a6c609e6b62cd0b9fbea5400bf370891
EOF
RUN
