]> code.delx.au - gnu-emacs/blobdiff - test/automated/package-x-test.el
Merge from gnulib.
[gnu-emacs] / test / automated / package-x-test.el
old mode 100755 (executable)
new mode 100644 (file)
index c4923fc..cce51b6
@@ -1,14 +1,16 @@
 ;;; 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:
 
-;; Run this from a separate Emacs instance from your main one as it
-;; messes with the package archive files. In fact, it wouldn't be a
-;; bad idea to back up your whole package archive before testing!
+;; 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:
 ;;
@@ -35,6 +35,7 @@
 (require 'package-x)
 (require 'ert)
 (require 'cl-lib)
+(eval-when-compile (require 'package-test))
 
 ;; package-test is not normally in `load-path', so temporarily set
 ;; `load-path' to contain the current directory.
   (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 ()