From 6579e5b6bb006c23140ed09d1220022604f317fe Mon Sep 17 00:00:00 2001 From: Phillip Lord Date: Tue, 24 Nov 2015 22:21:20 +0000 Subject: [PATCH] Move package test files to new directory. * test/lisp/emacs-lisp/package-tests.el: Update resoruce file location. * test/data/package: Moved to test/lisp/emacs-lisp/package-resources --- .../package-resources}/archive-contents | 0 .../emacs-lisp/package-resources}/key.pub | 0 .../emacs-lisp/package-resources}/key.sec | 0 .../package-resources}/multi-file-0.2.3.tar | Bin .../package-resources}/multi-file-readme.txt | 0 .../newer-versions/archive-contents | 0 .../newer-versions/new-pkg-1.0.el | 0 .../newer-versions/simple-single-1.4.el | 0 .../package-resources}/package-test-server.py | 0 .../signed/archive-contents | 0 .../signed/archive-contents.sig | Bin .../signed/signed-bad-1.0.el | 0 .../signed/signed-bad-1.0.el.sig | Bin .../signed/signed-good-1.0.el | 0 .../signed/signed-good-1.0.el.sig | Bin .../package-resources}/simple-depend-1.0.el | 0 .../package-resources}/simple-single-1.3.el | 0 .../simple-single-readme.txt | 0 .../simple-two-depend-1.1.el | 0 test/lisp/emacs-lisp/package-tests.el | 23 +++++++++--------- 20 files changed, 12 insertions(+), 11 deletions(-) rename test/{data/package => lisp/emacs-lisp/package-resources}/archive-contents (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/key.pub (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/key.sec (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/multi-file-0.2.3.tar (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/multi-file-readme.txt (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/newer-versions/archive-contents (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/newer-versions/new-pkg-1.0.el (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/newer-versions/simple-single-1.4.el (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/package-test-server.py (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/signed/archive-contents (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/signed/archive-contents.sig (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/signed/signed-bad-1.0.el (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/signed/signed-bad-1.0.el.sig (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/signed/signed-good-1.0.el (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/signed/signed-good-1.0.el.sig (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/simple-depend-1.0.el (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/simple-single-1.3.el (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/simple-single-readme.txt (100%) rename test/{data/package => lisp/emacs-lisp/package-resources}/simple-two-depend-1.1.el (100%) diff --git a/test/data/package/archive-contents b/test/lisp/emacs-lisp/package-resources/archive-contents similarity index 100% rename from test/data/package/archive-contents rename to test/lisp/emacs-lisp/package-resources/archive-contents diff --git a/test/data/package/key.pub b/test/lisp/emacs-lisp/package-resources/key.pub similarity index 100% rename from test/data/package/key.pub rename to test/lisp/emacs-lisp/package-resources/key.pub diff --git a/test/data/package/key.sec b/test/lisp/emacs-lisp/package-resources/key.sec similarity index 100% rename from test/data/package/key.sec rename to test/lisp/emacs-lisp/package-resources/key.sec diff --git a/test/data/package/multi-file-0.2.3.tar b/test/lisp/emacs-lisp/package-resources/multi-file-0.2.3.tar similarity index 100% rename from test/data/package/multi-file-0.2.3.tar rename to test/lisp/emacs-lisp/package-resources/multi-file-0.2.3.tar diff --git a/test/data/package/multi-file-readme.txt b/test/lisp/emacs-lisp/package-resources/multi-file-readme.txt similarity index 100% rename from test/data/package/multi-file-readme.txt rename to test/lisp/emacs-lisp/package-resources/multi-file-readme.txt diff --git a/test/data/package/newer-versions/archive-contents b/test/lisp/emacs-lisp/package-resources/newer-versions/archive-contents similarity index 100% rename from test/data/package/newer-versions/archive-contents rename to test/lisp/emacs-lisp/package-resources/newer-versions/archive-contents diff --git a/test/data/package/newer-versions/new-pkg-1.0.el b/test/lisp/emacs-lisp/package-resources/newer-versions/new-pkg-1.0.el similarity index 100% rename from test/data/package/newer-versions/new-pkg-1.0.el rename to test/lisp/emacs-lisp/package-resources/newer-versions/new-pkg-1.0.el diff --git a/test/data/package/newer-versions/simple-single-1.4.el b/test/lisp/emacs-lisp/package-resources/newer-versions/simple-single-1.4.el similarity index 100% rename from test/data/package/newer-versions/simple-single-1.4.el rename to test/lisp/emacs-lisp/package-resources/newer-versions/simple-single-1.4.el diff --git a/test/data/package/package-test-server.py b/test/lisp/emacs-lisp/package-resources/package-test-server.py similarity index 100% rename from test/data/package/package-test-server.py rename to test/lisp/emacs-lisp/package-resources/package-test-server.py diff --git a/test/data/package/signed/archive-contents b/test/lisp/emacs-lisp/package-resources/signed/archive-contents similarity index 100% rename from test/data/package/signed/archive-contents rename to test/lisp/emacs-lisp/package-resources/signed/archive-contents diff --git a/test/data/package/signed/archive-contents.sig b/test/lisp/emacs-lisp/package-resources/signed/archive-contents.sig similarity index 100% rename from test/data/package/signed/archive-contents.sig rename to test/lisp/emacs-lisp/package-resources/signed/archive-contents.sig diff --git a/test/data/package/signed/signed-bad-1.0.el b/test/lisp/emacs-lisp/package-resources/signed/signed-bad-1.0.el similarity index 100% rename from test/data/package/signed/signed-bad-1.0.el rename to test/lisp/emacs-lisp/package-resources/signed/signed-bad-1.0.el diff --git a/test/data/package/signed/signed-bad-1.0.el.sig b/test/lisp/emacs-lisp/package-resources/signed/signed-bad-1.0.el.sig similarity index 100% rename from test/data/package/signed/signed-bad-1.0.el.sig rename to test/lisp/emacs-lisp/package-resources/signed/signed-bad-1.0.el.sig diff --git a/test/data/package/signed/signed-good-1.0.el b/test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el similarity index 100% rename from test/data/package/signed/signed-good-1.0.el rename to test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el diff --git a/test/data/package/signed/signed-good-1.0.el.sig b/test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el.sig similarity index 100% rename from test/data/package/signed/signed-good-1.0.el.sig rename to test/lisp/emacs-lisp/package-resources/signed/signed-good-1.0.el.sig diff --git a/test/data/package/simple-depend-1.0.el b/test/lisp/emacs-lisp/package-resources/simple-depend-1.0.el similarity index 100% rename from test/data/package/simple-depend-1.0.el rename to test/lisp/emacs-lisp/package-resources/simple-depend-1.0.el diff --git a/test/data/package/simple-single-1.3.el b/test/lisp/emacs-lisp/package-resources/simple-single-1.3.el similarity index 100% rename from test/data/package/simple-single-1.3.el rename to test/lisp/emacs-lisp/package-resources/simple-single-1.3.el diff --git a/test/data/package/simple-single-readme.txt b/test/lisp/emacs-lisp/package-resources/simple-single-readme.txt similarity index 100% rename from test/data/package/simple-single-readme.txt rename to test/lisp/emacs-lisp/package-resources/simple-single-readme.txt diff --git a/test/data/package/simple-two-depend-1.1.el b/test/lisp/emacs-lisp/package-resources/simple-two-depend-1.1.el similarity index 100% rename from test/data/package/simple-two-depend-1.1.el rename to test/lisp/emacs-lisp/package-resources/simple-two-depend-1.1.el diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el index de41c3bc8e4..6b3069c2a54 100644 --- a/test/lisp/emacs-lisp/package-tests.el +++ b/test/lisp/emacs-lisp/package-tests.el @@ -97,7 +97,7 @@ (multi-file (0 1)))) "`package-desc' used for testing dependencies.") -(defvar package-test-data-dir (expand-file-name "data/package" package-test-file-dir) +(defvar package-test-data-dir (expand-file-name "package-resources" package-test-file-dir) "Base directory of package test files.") (defvar package-test-fake-contents-file @@ -190,18 +190,18 @@ Must called from within a `tar-mode' buffer." (ert-deftest package-test-desc-from-buffer () "Parse an elisp buffer to get a `package-desc' object." - (with-package-test (:basedir "data/package" :file "simple-single-1.3.el") + (with-package-test (:basedir "package-resources" :file "simple-single-1.3.el") (should (equal (package-buffer-info) simple-single-desc))) - (with-package-test (:basedir "data/package" :file "simple-depend-1.0.el") + (with-package-test (:basedir "package-resources" :file "simple-depend-1.0.el") (should (equal (package-buffer-info) simple-depend-desc))) - (with-package-test (:basedir "data/package" + (with-package-test (:basedir "package-resources" :file "multi-file-0.2.3.tar") (tar-mode) (should (equal (package-tar-file-info) multi-file-desc)))) (ert-deftest package-test-install-single () "Install a single file without using an archive." - (with-package-test (:basedir "data/package" :file "simple-single-1.3.el") + (with-package-test (:basedir "package-resources" :file "simple-single-1.3.el") (should (package-install-from-buffer)) (package-initialize) (should (package-installed-p 'simple-single)) @@ -269,7 +269,7 @@ Must called from within a `tar-mode' buffer." (ert-deftest package-test-install-prioritized () "Install a lower version from a higher-prioritized archive." (with-package-test () - (let* ((newer-version (expand-file-name "data/package/newer-versions" + (let* ((newer-version (expand-file-name "package-resources/newer-versions" package-test-file-dir)) (package-archives `(("older" . ,package-test-data-dir) ("newer" . ,newer-version))) @@ -285,7 +285,7 @@ Must called from within a `tar-mode' buffer." (ert-deftest package-test-install-multifile () "Check properties of the installed multi-file package." - (with-package-test (:basedir "data/package" :install '(multi-file)) + (with-package-test (:basedir "package-resources" :install '(multi-file)) (let ((autoload-file (expand-file-name "multi-file-autoloads.el" (expand-file-name @@ -336,7 +336,7 @@ Must called from within a `tar-mode' buffer." (package-menu-execute) (should (package-installed-p 'simple-single)) (let ((package-test-data-dir - (expand-file-name "data/package/newer-versions" package-test-file-dir))) + (expand-file-name "package-resources/newer-versions" package-test-file-dir))) (setq package-archives `(("gnu" . ,package-test-data-dir))) (package-menu-refresh) @@ -456,7 +456,7 @@ Must called from within a `tar-mode' buffer." (delete-directory homedir t))))) (let* ((keyring (expand-file-name "key.pub" package-test-data-dir)) (package-test-data-dir - (expand-file-name "data/package/signed" package-test-file-dir))) + (expand-file-name "package-resources/signed" package-test-file-dir))) (with-package-test () (package-initialize) (package-import-keyring keyring) @@ -508,7 +508,7 @@ Must called from within a `tar-mode' buffer." (ert-deftest package-x-test-upload-buffer () "Test creating an \"archive-contents\" file" - (with-package-test (:basedir "data/package" + (with-package-test (:basedir "package-resources" :file "simple-single-1.3.el" :upload-base t) (package-upload-buffer) @@ -532,7 +532,7 @@ Must called from within a `tar-mode' buffer." (ert-deftest package-x-test-upload-new-version () "Test uploading a new version of a package" - (with-package-test (:basedir "data/package" + (with-package-test (:basedir "package-resources" :file "simple-single-1.3.el" :upload-base t) (package-upload-buffer) @@ -599,6 +599,7 @@ Must called from within a `tar-mode' buffer." simple-depend-desc-2))) (should (equal (package--sort-by-dependence delete-list) + (list simple-depend-desc-2 simple-depend-desc-1 new-pkg-desc multi-file-desc simple-depend-desc simple-single-desc))) (should -- 2.39.2