aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJuanma Barranquero2014-04-25 18:11:07 +0200
committerJuanma Barranquero2014-04-25 18:11:07 +0200
commitdff4a9f6a4e9e42de6177e29faa7e3524b47e6d4 (patch)
tree60924b65da522416f928b436f8525f5bc8bfc3d7 /test
parent8de17fac97652d77bffd24e41b0097c863bd752b (diff)
parent844465d6cac7c243e37e446067b1a2e06be293da (diff)
downloademacs-dff4a9f6a4e9e42de6177e29faa7e3524b47e6d4.tar.gz
emacs-dff4a9f6a4e9e42de6177e29faa7e3524b47e6d4.zip
Merge from emacs-24; up to 2014-04-25T10:35:01Z!michael.albinus@gmx.de
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog14
-rw-r--r--test/automated/file-notify-tests.el39
-rw-r--r--test/automated/tramp-tests.el37
-rwxr-xr-xtest/indent/perl.perl2
4 files changed, 61 insertions, 31 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 7652e71f5c3..afc05d338a9 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,17 @@
12014-04-25 Michael Albinus <michael.albinus@gmx.de>
2
3 * automated/tramp-tests.el (top):
4 * automated/file-notify-tests.el (top): Do not disable interactive
5 passwords in batch mode.
6 (password-cache-expiry): Set to nil.
7
8 * automated/file-notify-tests.el
9 (file-notify-test-remote-temporary-file-directory):
10 * automated/tramp-tests.el (tramp-test-temporary-file-directory):
11 Use a mock-up method as default.
12 (tramp-test00-availability): Print the used directory name.
13 (tramp-test33-recursive-load): Fix typo.
14
12014-04-22 Michael Albinus <michael.albinus@gmx.de> 152014-04-22 Michael Albinus <michael.albinus@gmx.de>
2 16
3 * automated/tramp-tests.el (tramp--test-check-files): Remove traces. 17 * automated/tramp-tests.el (tramp--test-check-files): Remove traces.
diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el
index f1d9aee974c..d9a5b039216 100644
--- a/test/automated/file-notify-tests.el
+++ b/test/automated/file-notify-tests.el
@@ -19,15 +19,17 @@
19 19
20;;; Commentary: 20;;; Commentary:
21 21
22;; Some of the tests require access to a remote host files. Set 22;; Some of the tests require access to a remote host files. Since
23;; $REMOTE_TEMPORARY_FILE_DIRECTORY to a suitable value in order 23;; this could be problematic, a mock-up connection method "mock" is
24;; to overwrite the default value. If you want to skip tests 24;; used. Emulating a remote connection, it simply calls "sh -i".
25;; accessing a remote host, set this environment variable to 25;; Tramp's file name handlers still run, so this test is sufficient
26;; "/dev/null" or whatever is appropriate on your system. 26;; except for connection establishing.
27 27
28;; When running the tests in batch mode, it must NOT require an 28;; If you want to test a real Tramp connection, set
29;; interactive password prompt unless the environment variable 29;; $REMOTE_TEMPORARY_FILE_DIRECTORY to a suitable value in order to
30;; $REMOTE_ALLOW_PASSWORD is set. 30;; overwrite the default value. If you want to skip tests accessing a
31;; remote host, set this environment variable to "/dev/null" or
32;; whatever is appropriate on your system.
31 33
32;; A whole test run can be performed calling the command `file-notify-test-all'. 34;; A whole test run can be performed calling the command `file-notify-test-all'.
33 35
@@ -35,13 +37,22 @@
35 37
36(require 'ert) 38(require 'ert)
37(require 'filenotify) 39(require 'filenotify)
40(require 'tramp)
38 41
39;; There is no default value on w32 systems, which could work out of the box. 42;; There is no default value on w32 systems, which could work out of the box.
40(defconst file-notify-test-remote-temporary-file-directory 43(defconst file-notify-test-remote-temporary-file-directory
41 (cond 44 (cond
42 ((getenv "REMOTE_TEMPORARY_FILE_DIRECTORY")) 45 ((getenv "REMOTE_TEMPORARY_FILE_DIRECTORY"))
43 ((eq system-type 'windows-nt) null-device) 46 ((eq system-type 'windows-nt) null-device)
44 (t (format "/ssh::%s" temporary-file-directory))) 47 (t (add-to-list
48 'tramp-methods
49 '("mock"
50 (tramp-login-program "sh")
51 (tramp-login-args (("-i")))
52 (tramp-remote-shell "/bin/sh")
53 (tramp-remote-shell-args ("-c"))
54 (tramp-connection-timeout 10)))
55 (format "/mock::%s" temporary-file-directory)))
45 "Temporary directory for Tramp tests.") 56 "Temporary directory for Tramp tests.")
46 57
47(defvar file-notify--test-tmpfile nil) 58(defvar file-notify--test-tmpfile nil)
@@ -49,14 +60,10 @@
49(defvar file-notify--test-results nil) 60(defvar file-notify--test-results nil)
50(defvar file-notify--test-event nil) 61(defvar file-notify--test-event nil)
51 62
52(require 'tramp) 63(setq password-cache-expiry nil
53(setq tramp-verbose 0 64 tramp-verbose 0
54 tramp-message-show-message nil) 65 tramp-message-show-message nil)
55 66
56;; Disable interactive passwords in batch mode.
57(when (and noninteractive (not (getenv "REMOTE_ALLOW_PASSWORD")))
58 (defalias 'tramp-read-passwd 'ignore))
59
60;; This shall happen on hydra only. 67;; This shall happen on hydra only.
61(when (getenv "NIX_STORE") 68(when (getenv "NIX_STORE")
62 (add-to-list 'tramp-remote-path 'tramp-own-remote-path)) 69 (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el
index b6e757d3ae5..2640ee9cef5 100644
--- a/test/automated/tramp-tests.el
+++ b/test/automated/tramp-tests.el
@@ -21,15 +21,17 @@
21 21
22;; The tests require a recent ert.el from Emacs 24.4. 22;; The tests require a recent ert.el from Emacs 24.4.
23 23
24;; Some of the tests require access to a remote host files. Set 24;; Some of the tests require access to a remote host files. Since
25;; $REMOTE_TEMPORARY_FILE_DIRECTORY to a suitable value in order 25;; this could be problematic, a mock-up connection method "mock" is
26;; to overwrite the default value. If you want to skip tests 26;; used. Emulating a remote connection, it simply calls "sh -i".
27;; accessing a remote host, set this environment variable to 27;; Tramp's file name handlers still run, so this test is sufficient
28;; "/dev/null" or whatever is appropriate on your system. 28;; except for connection establishing.
29 29
30;; When running the tests in batch mode, it must NOT require an 30;; If you want to test a real Tramp connection, set
31;; interactive password prompt unless the environment variable 31;; $REMOTE_TEMPORARY_FILE_DIRECTORY to a suitable value in order to
32;; $REMOTE_ALLOW_PASSWORD is set. 32;; overwrite the default value. If you want to skip tests accessing a
33;; remote host, set this environment variable to "/dev/null" or
34;; whatever is appropriate on your system.
33 35
34;; A whole test run can be performed calling the command `tramp-test-all'. 36;; A whole test run can be performed calling the command `tramp-test-all'.
35 37
@@ -51,7 +53,15 @@
51 (cond 53 (cond
52 ((getenv "REMOTE_TEMPORARY_FILE_DIRECTORY")) 54 ((getenv "REMOTE_TEMPORARY_FILE_DIRECTORY"))
53 ((eq system-type 'windows-nt) null-device) 55 ((eq system-type 'windows-nt) null-device)
54 (t (format "/ssh::%s" temporary-file-directory))) 56 (t (add-to-list
57 'tramp-methods
58 '("mock"
59 (tramp-login-program "sh")
60 (tramp-login-args (("-i")))
61 (tramp-remote-shell "/bin/sh")
62 (tramp-remote-shell-args ("-c"))
63 (tramp-connection-timeout 10)))
64 (format "/mock::%s" temporary-file-directory)))
55 "Temporary directory for Tramp tests.") 65 "Temporary directory for Tramp tests.")
56 66
57(setq password-cache-expiry nil 67(setq password-cache-expiry nil
@@ -59,10 +69,6 @@
59 tramp-copy-size-limit nil 69 tramp-copy-size-limit nil
60 tramp-message-show-message nil) 70 tramp-message-show-message nil)
61 71
62;; Disable interactive passwords in batch mode.
63(when (and noninteractive (not (getenv "REMOTE_ALLOW_PASSWORD")))
64 (defalias 'tramp-read-passwd 'ignore))
65
66;; This shall happen on hydra only. 72;; This shall happen on hydra only.
67(when (getenv "NIX_STORE") 73(when (getenv "NIX_STORE")
68 (add-to-list 'tramp-remote-path 'tramp-own-remote-path)) 74 (add-to-list 'tramp-remote-path 'tramp-own-remote-path))
@@ -127,6 +133,7 @@ eval properly in `should', `should-not' or `should-error'."
127(ert-deftest tramp-test00-availability () 133(ert-deftest tramp-test00-availability ()
128 "Test availability of Tramp functions." 134 "Test availability of Tramp functions."
129 :expected-result (if (tramp--test-enabled) :passed :failed) 135 :expected-result (if (tramp--test-enabled) :passed :failed)
136 (message "Remote directory: `%s'" tramp-test-temporary-file-directory)
130 (should (ignore-errors 137 (should (ignore-errors
131 (and 138 (and
132 (file-remote-p tramp-test-temporary-file-directory) 139 (file-remote-p tramp-test-temporary-file-directory)
@@ -1589,7 +1596,7 @@ process sentinels. They shall not disturb each other."
1589 (dolist (code 1596 (dolist (code
1590 (list 1597 (list
1591 (format 1598 (format
1592 "(expand-file-name %S))" 1599 "(expand-file-name %S)"
1593 tramp-test-temporary-file-directory) 1600 tramp-test-temporary-file-directory)
1594 (format 1601 (format
1595 "(let ((default-directory %S)) (expand-file-name %S))" 1602 "(let ((default-directory %S)) (expand-file-name %S))"
diff --git a/test/indent/perl.perl b/test/indent/perl.perl
index 7cb877b0a95..c7a2fbfb2d2 100755
--- a/test/indent/perl.perl
+++ b/test/indent/perl.perl
@@ -1,6 +1,8 @@
1#!/usr/bin/perl 1#!/usr/bin/perl
2# -*- eval: (bug-reference-mode 1) -*- 2# -*- eval: (bug-reference-mode 1) -*-
3 3
4if ($c && /====/){xyz;}
5
4print <<"EOF1" . s/he"llo/th'ere/; 6print <<"EOF1" . s/he"llo/th'ere/;
5foo 7foo
6EOF2 8EOF2