From 7a9786b4154f939e60bb2923b8b90a81f38e20ad Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 29 Jun 2021 06:52:38 -0700 Subject: New function: path-search. * lisplib.c (path_test_set_entries): Autoload on path-search. * stdlib/path-test.tl (path-search): New function. * tests/018/path-test.tl: New file. * txr.1: Documented. * stdlib/doc-lookup.tl: Updated. --- tests/018/path-test.tl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/018/path-test.tl (limited to 'tests') diff --git a/tests/018/path-test.tl b/tests/018/path-test.tl new file mode 100644 index 00000000..2b4e1717 --- /dev/null +++ b/tests/018/path-test.tl @@ -0,0 +1,15 @@ +(load "../common") + +(mtest + (path-search "sh") "/bin/sh" + (path-search "AlMoStCeRtAiNlLyNoNeXisTenT") nil + (path-search "") nil + (path-search "sh" nil) nil + (path-search "sh" '("AlMoStCeRtAiNlLyNoNeXisTenT")) nil + (path-search "sh" '("AlMoStCeRtAiNlLyNoNeXisTenT" "/bin")) "/bin/sh" + (path-search "sh" '("/bin")) "/bin/sh" + (path-search "sh" "AlMoStCeRtAiNlLyNoNeXisTenT") nil + (path-search "sh" "AlMoStCeRtAiNlLyNoNeXisTenT:/bin") "/bin/sh" + (path-search "sh" "/bin") "/bin/sh" + (path-search "sh" "/bin/") "/bin/sh" + (path-search "sh" ":/bin/") "/bin/sh") -- cgit v1.2.3