summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSebastian Wiesner <lunaryorn@gmail.com>2013-11-01 12:05:48 +0100
committerSebastian Wiesner <lunaryorn@gmail.com>2013-11-01 12:05:48 +0100
commitf417941493a153cd081390718387fa51179ce525 (patch)
tree6a66e330179fdd40d38887a673de01beab03c4ae /test
parent138d91ebbe232ec8f1ad93939deac3f9ed916277 (diff)
Add test case for a built-in package
Diffstat (limited to 'test')
-rw-r--r--test/pkg-info-test.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/pkg-info-test.el b/test/pkg-info-test.el
index 0d1fe00..e9e28e5 100644
--- a/test/pkg-info-test.el
+++ b/test/pkg-info-test.el
@@ -27,14 +27,22 @@
(require 'pkg-info)
(require 'ert)
+(require 'lisp-mnt)
(require 'pkg-info-dummy-package)
+(defconst pkg-info-ruby-mode-version
+ (with-temp-buffer
+ (insert-file-contents (find-library-name "ruby-mode"))
+ (version-to-list (lm-header "Version"))))
+
(ert-deftest pkg-info-library-version-feature ()
(should (equal (pkg-info-library-version 'pkg-info-dummy-package) '(3 4 2 1)))
+ (should (equal (pkg-info-library-version 'ruby-mode)
+ pkg-info-ruby-mode-version))
(should-error (pkg-info-library-version 'no-such-feature))
;; TODO: Fails? We must find a way to get the defining file of a `require'
- ;; (should (equal (pkg-info-library-version 'pkg-info) pkg-info-version))
+ ;; (should (equal (pkg-info-library-version 'pkg-info) (pkg-info-version)))
)
(ert-deftest pkg-info-library-version-filename ()