From db938a59d5178fa26ca370f012cea5bf85507977 Mon Sep 17 00:00:00 2001 From: lread Date: Thu, 25 Jul 2024 18:09:01 -0400 Subject: [PATCH] consistency: add dir context for macos/linux test --- test/babashka/process_test.cljc | 35 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/test/babashka/process_test.cljc b/test/babashka/process_test.cljc index 525284e..8f4b282 100644 --- a/test/babashka/process_test.cljc +++ b/test/babashka/process_test.cljc @@ -189,23 +189,24 @@ ;; see also babashka.process-exec-test/resolve-program-macos-linux-test (deftest process-resolve-program-macos-linux-test (doseq [{:keys [dir expected-workdir]} (dirs-for [nil :workdir])] - (u/with-program-scenario {:cwd [:sh] - :workdir [:sh] - :on-path [:sh]} - (doseq [[program expected-exedir] - [[(u/test-program :sh) :on-path] - [(str "./" (u/test-program :sh)) expected-workdir] - [(u/test-program-abs :workdir :sh) :workdir]] - :let [desc (format "program: %s expected-exedir %s" program expected-exedir)]] - (is (= (u/etpo {:exedir expected-exedir - :exename (u/test-program :sh) - :workdir expected-workdir}) - (plines program dir)) - desc))) - (u/with-program-scenario {:cwd [:sh] - :workdir [:sh]} - (is (thrown-with-msg? Exception #"No such file" - (plines (u/test-program :sh) dir))))))) + (testing (format "dir: %s" (or dir "")) + (u/with-program-scenario {:cwd [:sh] + :workdir [:sh] + :on-path [:sh]} + (doseq [[program expected-exedir] + [[(u/test-program :sh) :on-path] + [(str "./" (u/test-program :sh)) expected-workdir] + [(u/test-program-abs :workdir :sh) :workdir]] + :let [desc (format "program: %s expected-exedir %s" program expected-exedir)]] + (is (= (u/etpo {:exedir expected-exedir + :exename (u/test-program :sh) + :workdir expected-workdir}) + (plines program dir)) + desc))) + (u/with-program-scenario {:cwd [:sh] + :workdir [:sh]} + (is (thrown-with-msg? Exception #"No such file" + (plines (u/test-program :sh) dir)))))))) (when (fs/windows?) ;; see also babashka.process-exec-test/resolve-program-win-test