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

NAME=iz (utf-16)
FILE=bins/elf/analysis/hello-utf-16
CMDS=<<EOF
iz~Hello
fl@F:strings
s sym.main
af
pdf~str.Hello
aar
fl@F:strings
EOF
EXPECT=<<EOF
0   0x000005e8 0x004005e8 11  26   .rodata utf16le Hello World
0x004005e8 26 str.Hello_World
0x00400608 16 str.S
|           0x0040052e      mov   qword [var_10h], str.Hello_World     ; 0x4005e8 ; u"\ufeffHello World\ufeff\n"
0x004005e8 26 str.Hello_World
0x00400608 16 str.S
EOF
RUN

NAME=iz (utf-32)
FILE=bins/elf/analysis/hello-utf-32
CMDS=<<EOF
iz~Hello
fl@F:strings
s sym.main
af
pdf~str.Hello
aar
fl@F:strings
EOF
EXPECT=<<EOF
0   0x000005e8 0x004005e8 11  52   .rodata utf32le Hello World
0x004005e8 52 str.Hello_World
0x00400628 32 str.S
|           0x0040052e      mov   qword [var_10h], str.Hello_World     ; 0x4005e8 ; U"\ufeffHello World\ufeff\n"
0x004005e8 52 str.Hello_World
0x00400628 32 str.S
EOF
RUN

NAME=iz (utf-16le)
FILE=bins/elf/analysis/hello-utf-16le
CMDS=<<EOF
iz~Hello
fl@F:strings
s sym.main
af
pdf~str.Hello
aar
fl@F:strings
EOF
EXPECT=<<EOF
0   0x000005e4 0x004005e4 12  26   .rodata utf16le Hello World\n
0x004005e4 26 str.Hello_World
0x00400600 16 str.S
|           0x0040052e      mov   qword [var_10h], str.Hello_World     ; 0x4005e4 ; u"Hello World\n"
0x004005e4 26 str.Hello_World
0x00400600 16 str.S
EOF
RUN

NAME=iz (utf-32le)
FILE=bins/elf/analysis/hello-utf-32le
CMDS=<<EOF
iz~Hello
fl@F:strings
s sym.main
af
pdf~str.Hello
aar
fl@F:strings
EOF
EXPECT=<<EOF
0   0x000005e8 0x004005e8 12  52   .rodata utf32le Hello World\n
0x004005e8 52 str.Hello_World
0x00400620 32 str.S
|           0x0040052e      mov   qword [var_10h], str.Hello_World     ; 0x4005e8 ; U"Hello World\n"
0x004005e8 52 str.Hello_World
0x00400620 32 str.S
EOF
RUN
