mirror of
https://github.com/janet-lang/janet
synced 2025-09-10 06:46:08 +00:00
Test bundle
This commit is contained in:
1
examples/sample-bad-bundle/badmod.janet
Normal file
1
examples/sample-bad-bundle/badmod.janet
Normal file
@@ -0,0 +1 @@
|
||||
(def abc 123)
|
7
examples/sample-bad-bundle/bundle.janet
Normal file
7
examples/sample-bad-bundle/bundle.janet
Normal file
@@ -0,0 +1,7 @@
|
||||
(defn install
|
||||
[manifest &]
|
||||
(bundle/add-file manifest "badmod.janet"))
|
||||
|
||||
(defn check
|
||||
[&]
|
||||
(error "Check failed!"))
|
@@ -117,6 +117,11 @@
|
||||
(assert (= 0 (length (bundle/list))) "bundles are listed correctly 7")
|
||||
(assert (= 0 (length (bundle/topolist))) "bundles are listed correctly 8")
|
||||
|
||||
# Try installing a bundle that fails check
|
||||
(assert-error "bad test" (bundle/install "./examples/sample-bad-bundle" :check true))
|
||||
(assert (= 0 (length (bundle/list))) "check failure 0")
|
||||
(assert (= 0 (length (bundle/topolist))) "check failure 1")
|
||||
|
||||
(rmrf syspath)
|
||||
|
||||
(end-suite)
|
||||
|
Reference in New Issue
Block a user