Mercurial > emacs
annotate test/comint-testsuite.el @ 110029:4c792e557a24
gnus-score-string: Fix regex for matching extra headers and regexp-quote the match if necessary by Andreas Schwab <schwab@suse.de>.
2009-02-04 Andreas Schwab <schwab@suse.de>
* gnus-score.el (gnus-score-string): Fix regex for matching extra
headers and regexp-quote the match if necessary.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Mon, 30 Aug 2010 06:32:33 +0000 |
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 |