From cf417ee1293520519d50e40d3d33cf9a36fe7f6c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 12 Jul 2021 10:13:37 -0700 Subject: 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. --- tests/010/json.tl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'tests/010/json.tl') 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)))) -- cgit v1.2.3