[#251] Test for uberscript with System/exit

This commit is contained in:
Michiel Borkent 2020-01-31 22:31:16 +01:00
parent e75475506c
commit 634084e592

View file

@ -330,6 +330,12 @@
(testing "the clojure.lang.MapEntry constructor works" (testing "the clojure.lang.MapEntry constructor works"
(is (true? (bb nil "(= (first {1 2}) (clojure.lang.MapEntry. 1 2))"))))) (is (true? (bb nil "(= (first {1 2}) (clojure.lang.MapEntry. 1 2))")))))
(deftest uberscript-test
(let [tmp-file (java.io.File/createTempFile "uberscript" ".clj")]
(.deleteOnExit tmp-file)
(is (empty? (bb nil "--uberscript" (.getPath tmp-file) "-e" "(System/exit 1)")))
(is (= "(System/exit 1)" (slurp tmp-file)))))
;;;; Scratch ;;;; Scratch
(comment (comment