Mercurial > emacs
annotate test/comint-testsuite.el @ 110776:073caec7510f
* net/tramp.el (tramp-handle-directory-files-and-attributes)
(tramp-handle-file-exists-p, tramp-handle-file-newer-than-file-p):
New defuns, taken from tramp-smb.el.
(tramp-coding-system-change-eol-conversion)
(tramp-set-process-query-on-exit-flag): Removed.
* net/tramp-compat.el (top): Do not check for byte-compiler
objects.
(tramp-compat-coding-system-change-eol-conversion)
(tramp-compat-set-process-query-on-exit-flag): New defuns, taken
from tramp.el.
* net/tramp-gvfs.el:
* net/tramp-gw.el: Replace `tramp-set-process-query-on-exit-flag'
by `tramp-compat-set-process-query-on-exit-flag'.
* net/tramp-imap.el (tramp-imap-file-name-handler-alist): Use
`tramp-handle-directory-files-and-attributes',
`tramp-handle-file-exists-p' and
`tramp-handle-file-newer-than-file-p'.
(tramp-imap-handle-file-exists-p)
(tramp-imap-handle-file-executable-p)
(tramp-imap-handle-file-readable-p)
(tramp-imap-handle-directory-files-and-attributes)
(tramp-imap-handle-file-newer-than-file-p): Removed.
* net/tramp-sh.el: Replace `tramp-set-process-query-on-exit-flag'
by `tramp-compat-set-process-query-on-exit-flag' and
`tramp-coding-system-change-eol-conversion' by
`tramp-compat-coding-system-change-eol-conversion'.
* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Use
`tramp-handle-directory-files-and-attributes',
`tramp-handle-file-exists-p' and
`tramp-handle-file-newer-than-file-p'.
(tramp-smb-handle-directory-files-and-attributes)
(tramp-smb-handle-file-exists-p)
(tramp-smb-handle-file-newer-than-file-p): Removed.
(tramp-smb-maybe-open-connection): Replace
`tramp-set-process-query-on-exit-flag' by
`tramp-compat-set-process-query-on-exit-flag'.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Tue, 05 Oct 2010 16:20:24 +0200 |
parents | cdae067c62d3 |
children | baf0b339ec21 |
rev | line source |
---|---|
108969
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
1 ;;; bytecomp-testsuite.el |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
2 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
3 ;; Copyright (C) 2010 Free Software Foundation, Inc. |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
4 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
5 ;; This file is part of GNU Emacs. |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
6 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
7 ;; GNU Emacs is free software: you can redistribute it and/or modify |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
8 ;; it under the terms of the GNU General Public License as published by |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
9 ;; the Free Software Foundation, either version 3 of the License, or |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
10 ;; (at your option) any later version. |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
11 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
12 ;; GNU Emacs is distributed in the hope that it will be useful, |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
13 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
15 ;; GNU General Public License for more details. |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
16 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
17 ;; You should have received a copy of the GNU General Public License |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
18 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
19 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
20 ;;; Commentary: |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
21 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
22 ;; Tests for comint and related modes. |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
23 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
24 ;;; Code: |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
25 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
26 (require 'comint) |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
27 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
28 (defun comint-testsuite-run () |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
29 (interactive) |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
30 (with-output-to-temp-buffer "*comint test*" |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
31 (comint-testsuite--test-comint-password-prompt-regexp))) |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
32 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
33 (defun comint-testsuite--test-comint-password-prompt-regexp () |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
34 (interactive) |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
35 (let ((password-strings |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
36 '("foo@example.net's password: " ;ssh |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
37 "Password for foo@example.org: " ; knit |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
38 "Kerberos password for devnull/root <at> GNU.ORG: " ; ksu |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
39 "Enter passphrase: " ; ssh-add |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
40 "Enter passphrase (empty for no passphrase): " ; ssh-keygen |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
41 "Enter same passphrase again: " ; ssh-keygen |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
42 "Passphrase for key root@GNU.ORG: " ; plink |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
43 "[sudo] password for user:" ; Ubuntu sudo |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
44 "Password (again):" |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
45 "Enter password:")) |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
46 fail) |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
47 (dolist (str password-strings) |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
48 (unless (string-match comint-password-prompt-regexp str) |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
49 (setq fail t) |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
50 (princ (format " ERROR: comint-password-prompt-regexp did not match %s\n" |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
51 str)))) |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
52 (if fail |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
53 (princ "FAILED: comint-password-prompt-regexp test\n") |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
54 (princ "PASSED: comint-password-prompt-regexp test\n")))) |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
55 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
56 (provide 'comint-testsuite) |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
57 |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
58 ;;; comint-testsuite.el ends here |
cdae067c62d3
Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
59 |