~subsetpark/bagatto

ref: import-syntax-update bagatto/test/require.janet -rw-r--r-- 431 bytes
34918929 — Zach Smith Add ignore file 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(import testament :prefix "" :exit true)
(import /src/env)

(setdyn :executable-blacklist {})

(deftest in-place
  (env/defrequire "ls" should-run [] :ok)
  (env/prepare-root-env!)
  (env/setdyn-blacklist!)
  (is (= :ok (should-run))))

(deftest not-in-place
  (env/defrequire "this-application-cannot-be-found" should-fail [] :ok)
  (env/prepare-root-env!)
  (env/setdyn-blacklist!)
  (assert-thrown (should-fail)))

(run-tests!)