rizin/subprojects/rizin-shell-parser/corpus/quoted_args.txt
Rot127 1b50a5b954
librz/core: remove old shell completely (#5004)
* Fix UB access of NULL context.

During the tests the global RzCons is accessed. Because it was
never initialized all members were 0.
Leading to undefined behavior and breaking the test with ASAN enabled.

* Use correct yaml example for the command described.

* Remove old shell compatibility code.

* Remove dependency tree of rz_core_cmd_subst() and rz_core_cmd_subst_i().

* Remove rz_core_cmd_pipe_old()

* Remove unused rz_core_hack_help()

* Regenerate grammar after removal of legacy_quoted_stmt.
2025-03-17 22:26:22 +08:00

62 lines
1.3 KiB
Text

==============================
Echo with (double) quoted args
==============================
echo "This;is.one@string"
---
(statements
(arged_stmt command: (cmd_identifier)
args: (args (arg (double_quoted_arg)))))
==============================
Echo with (single) quoted args
==============================
echo 'This;is.one@string'
---
(statements
(arged_stmt command: (cmd_identifier)
args: (args (arg (single_quoted_arg)))))
=======================================
Double quoted arg with cmd substitution
=======================================
echo "This is $(echo "a command")"
---
(statements
(arged_stmt command: (cmd_identifier)
args: (args
(arg (double_quoted_arg
(cmd_substitution_arg
(arged_stmt command: (cmd_identifier)
args: (args
(arg (double_quoted_arg))))))))))
==================
Quoted hash
==================
echo "#"
echo " #$(pdf)"
echo '#'
---
(statements
(arged_stmt command: (cmd_identifier)
args: (args (arg (double_quoted_arg))))
(arged_stmt command: (cmd_identifier)
args: (args
(arg (double_quoted_arg
(cmd_substitution_arg
(arged_stmt command: (cmd_identifier)))))))
(arged_stmt command: (cmd_identifier)
args: (args (arg (single_quoted_arg)))))