;;; package-test.el --- Tests for the Emacs package system
+;; Copyright (C) 2013-2014 Free Software Foundation, Inc.
+
;; Author: Daniel Hackney <dan@haxney.org>
;; Version: 1.0
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
-;; You may want to run this from a separate Emacs instance from your
-;; main one, because a bug in the code below could mess with your
-;; installed packages.
-
-;; Run this in a clean Emacs session using:
-;;
-;; $ emacs -Q --batch -L . -l package-x-test.el -f ert-run-tests-batch-and-exit
-
;;; Code:
(require 'package-x)
(require 'ert)
(require 'cl-lib)
-
-;; package-test is not normally in `load-path', so temporarily set
-;; `load-path' to contain the current directory.
-(let ((load-path (append (list (file-name-directory (or load-file-name
- buffer-file-name)))
- load-path)))
- (require 'package-test))
+(require 'package-test)
(defvar package-x-test--single-archive-entry-1-3
- (package-desc-create :name 'simple-single
- :version '(1 3)
- :summary "A single-file package with no dependencies"
- :kind 'single)
+ (cons 'simple-single
+ (package-make-ac-desc '(1 3) nil
+ "A single-file package with no dependencies"
+ 'single
+ '((:url . "http://doodles.au"))))
"Expected contents of the archive entry from the \"simple-single\" package.")
(defvar package-x-test--single-archive-entry-1-4
- (package-desc-create :name 'simple-single
- :version '(1 4)
- :summary "A single-file package with no dependencies"
- :kind 'single)
+ (cons 'simple-single
+ (package-make-ac-desc '(1 4) nil
+ "A single-file package with no dependencies"
+ 'single
+ nil))
"Expected contents of the archive entry from the updated \"simple-single\" package.")
(ert-deftest package-x-test-upload-buffer ()