rizin/test/db/cmd/cmd_pipe
Riccardo Schirone ae46f69366
core/serialize_core: exclude restoring of scr.prompt (#1398)
Restoring scr.prompt might break rz-pipe if you open a project from
within rz-pipe. Exclude scr.prompt so that it is not set to true in such
cases.
2021-08-05 16:52:01 +08:00

48 lines
1.1 KiB
Text

NAME=pipe args
FILE==
CMDS=#!pipe echo hello world
EXPECT=<<EOF
hello world
EOF
RUN
NAME=rzpipe.py
FILE=bins/elf/_Exit (42)
CMDS=<<EOF
?q `env~?^ASAN=1$`
?+ env LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5
#!pipe python3 scripts/get-funcs.py
EOF
EXPECT=<<EOF
Function names:
entry0
sym.imp._Exit
Disassembly of entry0:
;-- section..text:
;-- .text:
;-- _start():
/ entry0 ();
| 0x08049020 push ebp ; [10] -r-x section size 16 named .text
| 0x08049021 mov ebp, esp
| 0x08049023 sub esp, 8
| 0x08049026 sub esp, 0xc
| 0x08049029 push 0x2a ; '*' ; 42
\ 0x0804902b call sym.imp._Exit ; void _Exit(int status)
EOF
RUN
NAME=rzpipe load project
FILE=--
CMDS=<<EOF
?q `env~?^ASAN=1$`
?+ env LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5
!python3 -c 'import rzpipe;rz=rzpipe.open("--");rz.cmd("Po bins/other/ls.rzdb");print(rz.cmd("?v custom_main"))'
EOF
EXPECT=<<EOF
0x4070
EOF
RUN