Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update emacsmirror method for github method cleanup

Now it add a :pkgname property instead of just adding ":username
emacsmirror".

Also update the tests for the Github method
  • Loading branch information...
commit 4b747079645f3fa0809a36667ebc07bab4b44215 1 parent 188cee1
@DarwinAwardWinner DarwinAwardWinner authored
Showing with 30 additions and 9 deletions.
  1. +2 −1  methods/el-get-emacsmirror.el
  2. +28 −8 test/el-get-issue-513.el
View
3  methods/el-get-emacsmirror.el
@@ -20,7 +20,8 @@
"Return a github-type source equivalent to emacsmirror PACKAGE."
(assert (equal (el-get-package-type package) 'emacsmirror) nil
"Need an emacsmirror package")
- (append '(:type github :username "emacsmirror")
+ (append `(:type github
+ :pkgname ,(format "emacsmirror/%s" package))
(el-get-package-def package)))
;;
View
36 test/el-get-issue-513.el
@@ -5,18 +5,38 @@
(setq debug-on-error t
el-get-verbose t)
-;; Install a github-type recipe
-(el-get 'sync 'window-layout)
-;; Install an emacsmirror-type recipe
-(el-get 'sync 'dired-plus)
+(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-pkg
+ '((:name broken-github-recipe
:type github))))
- (el-get 'sync 'broken-pkg))
+ (el-get 'sync 'broken-github-recipe))
(signal 'test-failure
- '("The package\"broken-pkg\" should have caused an error, but it didn't.")))
- (error (message "Installing \"broken-pkg\" failed as expected. The error message was: %S" err)))
+ '("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)))
Please sign in to comment.
Something went wrong with that request. Please try again.