emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r118039: Merge package-x-test.el into package-test.e


From: Glenn Morris
Subject: [Emacs-diffs] trunk r118039: Merge package-x-test.el into package-test.el, to avoid running tests twice
Date: Sat, 04 Oct 2014 19:04:41 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 118039
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/18574
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2014-10-04 12:04:36 -0700
message:
  Merge package-x-test.el into package-test.el, to avoid running tests twice
  
  * test/automated/package-x-test.el: Remove file...
  * test/automated/package-test.el: ... merge package-x-test.el.
removed:
  test/automated/package-x-test.el 
packagextest.el-20130627091657-y6z4ce9fzk0b3j1j-1
modified:
  test/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-8588
  test/automated/package-test.el 
packagetest.el-20130627091655-6mb005jio30t2i3i-1
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2014-10-02 15:13:05 +0000
+++ b/test/ChangeLog    2014-10-04 19:04:36 +0000
@@ -1,3 +1,8 @@
+2014-10-04  Glenn Morris  <address@hidden>
+
+       * automated/package-x-test.el: Remove file...
+       * automated/package-test.el: ... merge package-x-test.el.  (Bug#18574)
+
 2014-10-02  Glenn Morris  <address@hidden>
 
        * automated/package-test.el (with-package-test, package-test-signed):

=== modified file 'test/automated/package-test.el'
--- a/test/automated/package-test.el    2014-10-02 15:13:05 +0000
+++ b/test/automated/package-test.el    2014-10-04 19:04:36 +0000
@@ -396,6 +396,73 @@
                        (expand-file-name "signed-good-1.0" package-user-dir))
                nil t))))))
 
+
+
+;;; Tests for package-x features.
+
+(require 'package-x)
+
+(defvar package-x-test--single-archive-entry-1-3
+  (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
+  (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 ()
+  "Test creating an \"archive-contents\" file"
+  (with-package-test (:basedir "data/package"
+                               :file "simple-single-1.3.el"
+                               :upload-base t)
+    (package-upload-buffer)
+    (should (file-exists-p (expand-file-name "archive-contents"
+                                             package-archive-upload-base)))
+    (should (file-exists-p (expand-file-name "simple-single-1.3.el"
+                                             package-archive-upload-base)))
+    (should (file-exists-p (expand-file-name "simple-single-readme.txt"
+                                             package-archive-upload-base)))
+
+    (let (archive-contents)
+      (with-temp-buffer
+        (insert-file-contents
+         (expand-file-name "archive-contents"
+                           package-archive-upload-base))
+        (setq archive-contents
+              (package-read-from-string
+               (buffer-substring (point-min) (point-max)))))
+      (should (equal archive-contents
+                     (list 1 package-x-test--single-archive-entry-1-3))))))
+
+(ert-deftest package-x-test-upload-new-version ()
+  "Test uploading a new version of a package"
+  (with-package-test (:basedir "data/package"
+                               :file "simple-single-1.3.el"
+                               :upload-base t)
+    (package-upload-buffer)
+    (with-temp-buffer
+      (insert-file-contents "newer-versions/simple-single-1.4.el")
+      (package-upload-buffer))
+
+    (let (archive-contents)
+      (with-temp-buffer
+        (insert-file-contents
+         (expand-file-name "archive-contents"
+                           package-archive-upload-base))
+        (setq archive-contents
+              (package-read-from-string
+               (buffer-substring (point-min) (point-max)))))
+      (should (equal archive-contents
+                     (list 1 package-x-test--single-archive-entry-1-4))))))
+
 (provide 'package-test)
 
 ;;; package-test.el ends here

=== removed file 'test/automated/package-x-test.el'
--- a/test/automated/package-x-test.el  2014-06-26 07:34:09 +0000
+++ b/test/automated/package-x-test.el  1970-01-01 00:00:00 +0000
@@ -1,95 +0,0 @@
-;;; package-test.el --- Tests for the Emacs package system
-
-;; Copyright (C) 2013-2014 Free Software Foundation, Inc.
-
-;; Author: Daniel Hackney <address@hidden>
-;; Version: 1.0
-
-;; This file is part of GNU Emacs.
-
-;; 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 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
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;;; Code:
-
-(require 'package-x)
-(require 'ert)
-(require 'cl-lib)
-(require 'package-test)
-
-(defvar package-x-test--single-archive-entry-1-3
-  (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
-  (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 ()
-  "Test creating an \"archive-contents\" file"
-  (with-package-test (:basedir "data/package"
-                               :file "simple-single-1.3.el"
-                               :upload-base t)
-    (package-upload-buffer)
-    (should (file-exists-p (expand-file-name "archive-contents"
-                                             package-archive-upload-base)))
-    (should (file-exists-p (expand-file-name "simple-single-1.3.el"
-                                             package-archive-upload-base)))
-    (should (file-exists-p (expand-file-name "simple-single-readme.txt"
-                                             package-archive-upload-base)))
-
-    (let (archive-contents)
-      (with-temp-buffer
-        (insert-file-contents
-         (expand-file-name "archive-contents"
-                           package-archive-upload-base))
-        (setq archive-contents
-              (package-read-from-string
-               (buffer-substring (point-min) (point-max)))))
-      (should (equal archive-contents
-                     (list 1 package-x-test--single-archive-entry-1-3))))))
-
-(ert-deftest package-x-test-upload-new-version ()
-  "Test uploading a new version of a package"
-  (with-package-test (:basedir "data/package"
-                               :file "simple-single-1.3.el"
-                               :upload-base t)
-    (package-upload-buffer)
-    (with-temp-buffer
-      (insert-file-contents "newer-versions/simple-single-1.4.el")
-      (package-upload-buffer))
-
-    (let (archive-contents)
-      (with-temp-buffer
-        (insert-file-contents
-         (expand-file-name "archive-contents"
-                           package-archive-upload-base))
-        (setq archive-contents
-              (package-read-from-string
-               (buffer-substring (point-min) (point-max)))))
-      (should (equal archive-contents
-                     (list 1 package-x-test--single-archive-entry-1-4))))))
-
-(provide 'package-x-test)
-
-;;; package-x-test.el ends here


reply via email to

[Prev in Thread] Current Thread [Next in Thread]