Fix doom-load-autoloads-file tests on macos
Since /var is symlinked to /private/var on macos, the tests -- which do a simple string comparison between two paths -- won't correctly determine the two paths are the same file.
This commit is contained in:
parent
c2db4a8708
commit
287cc94cba
2 changed files with 4 additions and 2 deletions
|
@ -13,6 +13,8 @@
|
||||||
;;
|
;;
|
||||||
;;; Buttercup extensions
|
;;; Buttercup extensions
|
||||||
|
|
||||||
|
(buttercup-define-matcher-for-binary-function :to-equal-file file-equal-p)
|
||||||
|
|
||||||
(buttercup-define-matcher :to-expand-into (form expected)
|
(buttercup-define-matcher :to-expand-into (form expected)
|
||||||
(cl-destructuring-bind (form expected)
|
(cl-destructuring-bind (form expected)
|
||||||
(mapcar #'funcall (list form expected))
|
(mapcar #'funcall (list form expected))
|
||||||
|
|
|
@ -86,12 +86,12 @@
|
||||||
|
|
||||||
(it "loads the byte-compiled autoloads file if available"
|
(it "loads the byte-compiled autoloads file if available"
|
||||||
(doom-load-autoloads-file doom-autoload-file)
|
(doom-load-autoloads-file doom-autoload-file)
|
||||||
(expect (caar load-history) :to-equal
|
(expect (caar load-history) :to-equal-file
|
||||||
(byte-compile-dest-file doom-autoload-file))
|
(byte-compile-dest-file doom-autoload-file))
|
||||||
|
|
||||||
(delete-file (byte-compile-dest-file doom-autoload-file))
|
(delete-file (byte-compile-dest-file doom-autoload-file))
|
||||||
(doom-load-autoloads-file doom-autoload-file)
|
(doom-load-autoloads-file doom-autoload-file)
|
||||||
(expect (caar load-history) :to-equal doom-autoload-file))
|
(expect (caar load-history) :to-equal-file doom-autoload-file))
|
||||||
|
|
||||||
(it "returns non-nil if successful"
|
(it "returns non-nil if successful"
|
||||||
(expect (doom-load-autoloads-file doom-autoload-file)))
|
(expect (doom-load-autoloads-file doom-autoload-file)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue