mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-30 05:29:52 +08:00
4b74707964
Now it add a :pkgname property instead of just adding ":username emacsmirror". Also update the tests for the Github method
43 lines
1.5 KiB
EmacsLisp
43 lines
1.5 KiB
EmacsLisp
;; https://github.com/dimitri/el-get/issues/513
|
|
;;
|
|
;; Testing the github and emacsmirror methods
|
|
|
|
(setq debug-on-error t
|
|
el-get-verbose t)
|
|
|
|
(condition-case nil
|
|
(error "THROW")
|
|
(error (message "Caught an error")))
|
|
|
|
;; ;; Install a github-type recipe
|
|
;; (el-get 'sync 'window-layout)
|
|
;; ;; Install an emacsmirror-type recipe
|
|
;; (el-get 'sync 'dired-plus)
|
|
|
|
;; Try to install a recipe for a nonexistent github repo
|
|
(condition-case err
|
|
(progn
|
|
;; Should fail
|
|
(let ((el-get-sources
|
|
'((:name valid-recipe-for-nonexistent-repo
|
|
:pkgname "xjklfjdlfs/fdjsklfdsj"
|
|
:type github)))
|
|
;; This seems to escape error handlers when
|
|
;; `debug-on-error' is t.
|
|
(debug-on-error nil))
|
|
(el-get 'sync 'valid-recipe-for-nonexistent-repo))
|
|
(signal 'test-failure
|
|
'("The package \"valid-recipe-for-nonexistent-repo\" should have caused an error, but it didn't.")))
|
|
(error (message "Installing \"valid-recipe-for-nonexistent-repo\" failed as expected. The error message was: %S" err)))
|
|
|
|
(condition-case err
|
|
(progn
|
|
;; Should fail
|
|
(let ((el-get-sources
|
|
'((:name broken-github-recipe
|
|
:type github))))
|
|
(el-get 'sync 'broken-github-recipe))
|
|
(signal 'test-failure
|
|
'("The package \"broken-github-recipe\" should have caused an error, but it didn't.")))
|
|
(error (message "Installing \"broken-github-recipe\" failed as expected. The error message was: %S" err)))
|