Fix flaky bb-edn test
This commit is contained in:
parent
d1b7c6edea
commit
294cfe403c
1 changed files with 7 additions and 15 deletions
|
|
@ -246,21 +246,13 @@
|
||||||
(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")))))
|
||||||
;; 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.
|
;; 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.
|
||||||
(when-not main/windows?
|
(testing "shell test with :continue"
|
||||||
(let [tmp-dir (fs/create-temp-dir)
|
(let [ls-cmd (if main/windows? "cmd /c dir" "ls")]
|
||||||
out (str (fs/file tmp-dir "out.txt"))
|
(test-utils/with-config {:tasks {'foo (list 'do
|
||||||
ls-cmd (if main/windows? "cmd /c dir" "ls")
|
(list 'shell {:continue true}
|
||||||
expected-output (if main/windows? "File Not Found" "foobar")]
|
(str ls-cmd " foobar"))
|
||||||
(testing "shell test with :continue"
|
(list 'println :hello))}}
|
||||||
(test-utils/with-config {:tasks {'foo (list 'shell {:out out
|
(is (= :hello (bb "foo")))))))
|
||||||
:err out
|
|
||||||
:continue true}
|
|
||||||
(str ls-cmd " foobar"))}}
|
|
||||||
(bb "foo")
|
|
||||||
(is (str/includes? (slurp out)
|
|
||||||
expected-output))))
|
|
||||||
(fs/delete out))))
|
|
||||||
|
|
||||||
|
|
||||||
(deftest ^:skip-windows unix-task-test
|
(deftest ^:skip-windows unix-task-test
|
||||||
(testing "shell pipe test"
|
(testing "shell pipe test"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue