2012-02-24 06:31:12 +08:00
|
|
|
;; https://github.com/dimitri/el-get/issues/589
|
|
|
|
;;
|
|
|
|
;; Lazy loading is broken
|
|
|
|
|
|
|
|
(let ((debug-on-error t)
|
|
|
|
;; (el-get-byte-compile nil)
|
|
|
|
(el-get-default-process-sync t)
|
|
|
|
(el-get-verbose t)
|
|
|
|
(el-get-is-lazy t)
|
|
|
|
(post-init-function-ran nil)
|
2012-02-24 06:40:32 +08:00
|
|
|
(prepare-function-ran nil)
|
2012-02-24 06:31:12 +08:00
|
|
|
(el-get-sources
|
|
|
|
'((:name test-pkg
|
|
|
|
:type builtin
|
|
|
|
:features ido
|
2012-02-24 07:05:49 +08:00
|
|
|
:prepare (setq prepare-function-ran t)
|
|
|
|
:post-init (setq post-init-function-ran t)
|
2012-02-24 06:31:12 +08:00
|
|
|
:lazy t))))
|
|
|
|
(assert (not post-init-function-ran) nil
|
|
|
|
"Post-init function should not run before installation")
|
|
|
|
(el-get 'sync 'test-pkg)
|
2012-02-24 06:40:32 +08:00
|
|
|
(assert prepare-function-ran nil
|
|
|
|
"Prepare function should have run after package installation.")
|
2012-02-24 06:31:12 +08:00
|
|
|
(assert (not post-init-function-ran) nil
|
|
|
|
"Post-init function should not run during installation")
|
|
|
|
(el-get-init 'test-pkg)
|
|
|
|
(assert (not post-init-function-ran) nil
|
|
|
|
"Post-init function should not run during init")
|
|
|
|
(require 'ido)
|
|
|
|
(assert post-init-function-ran nil
|
|
|
|
"Post-init function should have run when package feature was required"))
|