]> git.eshelyaron.com Git - emacs.git/commitdiff
Backport: Fix package tests when TMPDIR is in HOME
authorDmitry Gutov <dgutov@yandex.ru>
Fri, 23 Jan 2015 00:50:15 +0000 (02:50 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Fri, 23 Jan 2015 13:33:25 +0000 (15:33 +0200)
Fixes: debbugs:19657
* test/automated/package-test.el (with-package-test):
Bind `abbreviated-home-dir' to nil.
(package-test-describe-package, package-test-signed):
Expect abbreviated directory names.

(cherry picked from commit f02406c74a0a91b29073101912a4b80736a69581)

test/ChangeLog
test/automated/package-test.el

index 3f2d761dadda98abf00cff19ff0815e0aca86f61..ede6bd6476b1342adfb5a421bff55f48333babf0 100644 (file)
@@ -1,3 +1,11 @@
+2015-01-23  Dmitry Gutov  <dgutov@yandex.ru>
+
+       Fix package tests when TMPDIR is in HOME.  (Bug#19657)
+       * automated/package-test.el (with-package-test):
+       Bind `abbreviated-home-dir' to nil.
+       (package-test-describe-package, package-test-signed):
+       Expect abbreviated directory names.
+
 2015-01-22  Wolfgang Jenkner  <wjenkner@inode.at>
 
        * automated/calc-tests.el (calc-tests-equal, calc-tests-simple):
index c550dd03aca4d71fa5ef9358c9efff4d94a4890c..383af842d94bb6b6acf99f28183e34163f8484e7 100644 (file)
@@ -95,6 +95,7 @@
           (package-archives `(("gnu" . ,package-test-data-dir)))
           (old-yes-no-defn (symbol-function 'yes-or-no-p))
           (default-directory package-test-file-dir)
+          abbreviated-home-dir
           package--initialized
           package-alist
           ,@(if update-news
@@ -321,8 +322,7 @@ Must called from within a `tar-mode' buffer."
      (goto-char (point-min))
      (should (search-forward "simple-single is an installed package." nil t))
      (should (search-forward
-              (format "Status: Installed in `%s/' (unsigned)."
-                      (expand-file-name "simple-single-1.3" package-user-dir))
+              "Status: Installed in `~/simple-single-1.3/' (unsigned)."
               nil t))
      (should (search-forward "Version: 1.3" nil t))
      (should (search-forward "Summary: A single-file package with no dependencies"
@@ -391,8 +391,7 @@ Must called from within a `tar-mode' buffer."
        (goto-char (point-min))
        (should (search-forward "signed-good is an installed package." nil t))
        (should (search-forward
-               (format "Status: Installed in `%s/'."
-                       (expand-file-name "signed-good-1.0" package-user-dir))
+               "Status: Installed in `~/signed-good-1.0/'."
                nil t))))))
 
 (provide 'package-test)