radare2/test/db/cmd/feat_quote
Anthoine Bourgeois 1b3e24257e Handle $() and `` as equal sub-command.
Test fix:
db/cmd/feat_quote Quotes and substitution - newshell

Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
2021-04-24 21:58:09 +02:00

76 lines
836 B
Plaintext

NAME=Double quotes - newshell
ARGS=-e cfg.newshell=true
FILE=-
CMDS=<<EOF
w "Hello World"
ps
w0 15
w "\"Hello World\""
ps
w0 15
w "Hello;World"
ps
w0 15
w "Hello@World"
ps
EOF
EXPECT=<<EOF
Hello World
"Hello World"
Hello;World
Hello@World
EOF
RUN
NAME=Single quotes - newshell
ARGS=-e cfg.newshell=true
FILE=-
CMDS=<<EOF
w 'Hello World'
ps
w0 15
w '"Hello World"'
ps
w0 15
w '\'Hello World\''
ps
w0 15
w 'Hello;World'
ps
w0 15
w 'Hello@World'
ps
EOF
EXPECT=<<EOF
Hello World
"Hello World"
'Hello World'
Hello;World
Hello@World
EOF
RUN
NAME=Quotes and substitution - newshell
ARGS=-e cfg.newshell=true
FILE=-
CMDS=<<EOF
w "Hello $(?e World)"
ps
w0 15
w 'Hello $(?e World)'
ps
w0 15
w "Hello \$(?e World)"
ps
w0 17
w 'Hello \`?e World\`'
ps
w0 17
EOF
EXPECT=<<EOF
Hello World
Hello $(?e World)
Hello $(?e World)
Hello `?e World`
EOF
RUN