NAME=pdf dwarf
FILE=bins/elf/analysis/main
CMDS=<<EOF
fs *
f~str.
EOF
EXPECT=<<EOF
0x004005c4 12 str.Hello_World
EOF
RUN

NAME=iz (utf-16)
FILE=bins/elf/analysis/hello-utf-16
BROKEN=1
CMDS=<<EOF
iz~Hello
s sym.main
af
pdf~str.Hello
EOF
EXPECT=<<EOF
vaddr=0x004005e8 paddr=0x000005e8 ordinal=000 sz=24 len=11 section=.rodata type=wide string=Hello World
|           0x0040052e      48c745f8e805.  mov qword [local_8h], str.Hello_World
EOF
RUN

NAME=iz (utf-32)
FILE=bins/elf/analysis/hello-utf-32
BROKEN=1
CMDS=<<EOF
iz~Hello
s sym.main
af
pdf~str.Hello
EOF
EXPECT=<<EOF
vaddr=0x004005e8 paddr=0x000005e8 ordinal=000 sz=56 len=13 section=.rodata type=wide32 string=Hello World
|           0x0040052e      48c745f8e805.  mov qword [local_8h], str.Hello_World
EOF
RUN

NAME=iz (utf-16le)
FILE=bins/elf/analysis/hello-utf-16le
BROKEN=1
CMDS=<<EOF
iz~Hello
s sym.main
af
pdf~str.Hello
EOF
EXPECT=<<EOF
vaddr=0x004005e8 paddr=0x000005e8 ordinal=000 sz=24 len=11 section=.rodata type=wide string=Hello World
|           0x0040052e      48c745f8e805.  mov qword [local_8h], str.Hello_World
EOF
RUN

NAME=iz (utf-32le)
FILE=bins/elf/analysis/hello-utf-32le
BROKEN=1
CMDS=<<EOF
iz~Hello
s sym.main
af
pdf~str.Hello
EOF
EXPECT=<<EOF
vaddr=0x004005e8 paddr=0x000005e8 ordinal=000 sz=56 len=13 section=.rodata type=wide32 string=Hello World
|           0x0040052e      48c745f8e805.  mov qword [local_8h], str.Hello_World
EOF
RUN

NAME=iz
FILE=bins/elf/analysis/hello-utf-16
BROKEN=1
CMDS=iz~Hello
EXPECT=<<EOF
vaddr=0x004005e8 paddr=0x000005e8 ordinal=000 sz=24 len=11 section=.rodata type=wide string=Hello World
EOF
RUN

NAME=iz
FILE=bins/elf/analysis/hello-utf-32
BROKEN=1
CMDS=iz~Hello
EXPECT=<<EOF
vaddr=0x004005e8 paddr=0x000005e8 ordinal=000 sz=56 len=13 section=.rodata type=wide32 string=Hello World
EOF
RUN
