diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-04-04 19:48:34 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-04-04 19:48:34 -0700 |
commit | 9e42e3c971c2c1c69d2e03752735bbbd24007b6b (patch) | |
tree | 7c5cfb7bce92ce9e4c807127a41f7031ac75ad4d /tests/018/getput.tl | |
parent | d01e894af245c7f8df9b193b482150a1b9725f1c (diff) | |
download | txr-9e42e3c971c2c1c69d2e03752735bbbd24007b6b.tar.gz txr-9e42e3c971c2c1c69d2e03752735bbbd24007b6b.tar.bz2 txr-9e42e3c971c2c1c69d2e03752735bbbd24007b6b.zip |
New functions for filtering through external processes.
* stdlib/getput.tl (sys:maproc-common): new function.
(map-command-lines, map-command-str, map-command-buf,
map-process-lines, map-process-str, map-process-buf):
New functions.
* autoload.c (getput_set_entries): Trigger autoload
of getput module on new function symbols.
* tests/018/getput.tl: New tests.
* txr.1: Documented.
Diffstat (limited to 'tests/018/getput.tl')
-rw-r--r-- | tests/018/getput.tl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/018/getput.tl b/tests/018/getput.tl index 7e8e2be1..ed5a4e5f 100644 --- a/tests/018/getput.tl +++ b/tests/018/getput.tl @@ -31,3 +31,11 @@ (true (contains "syntax error" errors)) t (true (contains "unterminated" errors)) t (true (contains ":1" errors)) t)) + +(mtest + (map-command-lines "tr '[a-z]' '[A-Z]'" '#"a b c") #"A B C" + (map-process-lines "tr" '#"[a-z] [A-Z]" '#"a b c") #"A B C" + (map-command-str "tr '[a-z]' '[A-Z]'" "abc") "ABC" + (map-process-str "tr" '#"[a-z] [A-Z]" "abc") "ABC" + (map-command-buf "tr '[a-z]' '[A-Z]'" #b'616263') #b'414243' + (map-process-buf "tr" '#"[a-z] [A-Z]" #b'616263') #b'414243') |