diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-09-01 20:36:52 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-09-01 20:36:52 -0700 |
commit | a5d5536fcf2fe616b8c0941df0bc92f3bd9761ba (patch) | |
tree | 59d522eb4ec987ed034707d2644827cb4bc051e8 /tests/018 | |
parent | 9c0e5743188588ece98197880a3f1174170dc563 (diff) | |
download | txr-a5d5536fcf2fe616b8c0941df0bc92f3bd9761ba.tar.gz txr-a5d5536fcf2fe616b8c0941df0bc92f3bd9761ba.tar.bz2 txr-a5d5536fcf2fe616b8c0941df0bc92f3bd9761ba.zip |
New functions for shell escaping.
* stream.c (sh_esc, sh_esc_all, sh_esc_dq, sh_esc_sq): New static
functions.
(stream_init): sh-esc, sh-esc-all, sh-esc-dq, sh-esc-sq: Intrinsics
registered.
* tests/018/sh-esc.tl: New file.
* txr.1: Documented.
Diffstat (limited to 'tests/018')
-rw-r--r-- | tests/018/sh-esc.tl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/018/sh-esc.tl b/tests/018/sh-esc.tl new file mode 100644 index 00000000..3466ee76 --- /dev/null +++ b/tests/018/sh-esc.tl @@ -0,0 +1,11 @@ +(load "../common") + +(mtest + (sh-esc "|&;<>()$`\\\"' \t\n*?[#~=%abc") + "\\|\\&\\;\\<\\>\\(\\)\\$\\`\\\\\\\"\\'\\ \\\t\\\n\\*\\?\\[\\#\\~=%abc" + (sh-esc-all "|&;<>()$`\\\"' \t\n*?[#~=%abc") + "\\|\\&\\;\\<\\>\\(\\)\\$\\`\\\\\\\"\\'\\ \\\t\\\n\\*\\?\\[\\#\\~\\=\\%abc" + (sh-esc-dq "$`\\\"\n'abc()*~") + "\\$\\`\\\\\\\"\\\n'abc()*~" + (sh-esc-sq "$`\\\"\n'abc()*~") + "$`\\\"\n'\\''abc()*~") |