diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-03-18 09:17:22 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-03-18 09:17:22 -0700 |
commit | 9b9fdbda81790c06973d77c4b3c5b75be9dbebde (patch) | |
tree | dec76fce5d3c885eabc83ebedac9b64d9ac4e74e /testcases | |
parent | fc1f328339f7366fab9d197a2876d8207f38656c (diff) | |
download | cppawk-9b9fdbda81790c06973d77c4b3c5b75be9dbebde.tar.gz cppawk-9b9fdbda81790c06973d77c4b3c5b75be9dbebde.tar.bz2 cppawk-9b9fdbda81790c06973d77c4b3c5b75be9dbebde.zip |
Handle quoting properly.
The problem is that if $var holds escaped syntax, we
cannot just use it as command $var; the quotes become
part of the argument. We must get the shell to process the
quoted syntax, which requires eval. For this we define
a function which lets us do command $(syntax "$var").
Diffstat (limited to 'testcases')
-rw-r--r-- | testcases | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -116,3 +116,8 @@ gawk ./cppawk --prepro-only 'BEGIN { }' | grep BEGIN : BEGIN { } +-- +22: +./cppawk -v foo="'\"" 'BEGIN { print foo }' +: +'" |