diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-07-12 10:13:37 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-07-12 10:13:37 -0700 |
commit | cf417ee1293520519d50e40d3d33cf9a36fe7f6c (patch) | |
tree | f17f90fc50ce8f0f9405e339b54f85f6c04b45cb | |
parent | 15a53bb5c786ff4f3ea7e4bae0c980f4caaf07d0 (diff) | |
download | txr-cf417ee1293520519d50e40d3d33cf9a36fe7f6c.tar.gz txr-cf417ee1293520519d50e40d3d33cf9a36fe7f6c.tar.bz2 txr-cf417ee1293520519d50e40d3d33cf9a36fe7f6c.zip |
tests: json: skip tests relying on cat, if missing.
* tests/010/json.tl: skip several test cases which rely on the
cat utility for testing command-put-json, if the cat utility
is not found in the search path. Reported and investigated by
Paul A. Patience.
-rw-r--r-- | tests/010/json.tl | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/010/json.tl b/tests/010/json.tl index 46bcc23d..a0085000 100644 --- a/tests/010/json.tl +++ b/tests/010/json.tl @@ -148,10 +148,12 @@ #H(() ("a" t))) (file-put-jsons name '(1.0 t null)) t (file-get-jsons name) (1.0 t null) - (file-get-string name) "1\ntrue\nnull\n" - (command-put-json `cat > @name` #(#() #())) t - (file-get-string name) "[[],[]]\n" - (command-get-json `cat @name`) #(#() #()) - (command-put-jsons `cat > @name` '(#() 1.0 nil)) t - (file-get-string name) "[]\n1\nfalse\n" - (command-get-jsons `cat @name`) (#() 1.0 nil))) + (file-get-string name) "1\ntrue\nnull\n") + (if (path-search "cat") + (mtest + (command-put-json `cat > @name` #(#() #())) t + (file-get-string name) "[[],[]]\n" + (command-get-json `cat @name`) #(#() #()) + (command-put-jsons `cat > @name` '(#() 1.0 nil)) t + (file-get-string name) "[]\n1\nfalse\n" + (command-get-jsons `cat @name`) (#() 1.0 nil)))) |