NAME=cxx compatibility
FILE=-
CMDS="!rz-bin -D rust _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev"
EXPECT=<<EOF
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
EOF
RUN

NAME=rust basic nested type
FILE=-
CMDS="!rz-bin -D rust _ZN5alloc3oom3oom17h722648b727b8bcd0E"
EXPECT=<<EOF
alloc::oom::oom::h722648b727b8bcd0
EOF
RUN

NAME=rust basic nested type with hash
FILE=-
CMDS="!rz-bin -D rust _ZN4core3fmt5Write10write_char17hcc5144a9a84f2b15E"
EXPECT=<<EOF
core::fmt::Write::write_char::hcc5144a9a84f2b15
EOF
RUN

NAME=rust static type
FILE=-
CMDS=iD rust _ZN71_$LT$Test$u20$$u2b$$u20$$u27$static$u20$as$u20$foo..Bar$LT$Test$GT$$GT$3barE
EXPECT=<<EOF
<Test + 'static as foo::Bar<Test>>::bar
EOF
RUN

NAME=rust static type with hash
FILE=-
CMDS=iD rust _ZN96_$LT$core..fmt..Write..write_fmt..Adapter$LT$$u27$a$C$$u20$T$GT$$u20$as$u20$core..fmt..Write$GT$9write_str17he4f4768a2f446facE
EXPECT=<<EOF
<core::fmt::Write::write_fmt::Adapter<'a, T> as core::fmt::Write>::write_str::he4f4768a2f446fac
EOF
RUN

NAME=rust function in file
FILE=bins/elf/rust
CMDS=<<EOF
aa
afl~example
EOF
EXPECT=<<EOF
0x00002b30    2 15           sym._example::Foo_as_example::Bar_::bar::h26dc608664264fb6
0x00002b40    1 31           sym.example::main::hf45903a20ef2ad21
EOF
RUN
