diff options
| author | Chong Yidong | 2010-06-11 10:39:54 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-06-11 10:39:54 -0400 |
| commit | 6534e58a57f60d338491ca97db605cbb116f0c2f (patch) | |
| tree | 63f39d89c5cdb563c67a5d8a2599c3371296ed87 /test | |
| parent | 84d9562f579e56ce7bdf9c14b37ab0fa1f596681 (diff) | |
| download | emacs-6534e58a57f60d338491ca97db605cbb116f0c2f.tar.gz emacs-6534e58a57f60d338491ca97db605cbb116f0c2f.zip | |
Fix for comint-password-prompt-regexp (Bug#6367).
* lisp/comint.el (comint-password-prompt-regexp): Fix 2010-04-10 change
(Bug#6367).
* comint-testsuite.el: New file.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 4 | ||||
| -rw-r--r-- | test/comint-testsuite.el | 59 |
2 files changed, 63 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index d5199c04b53..d1825c0d169 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-06-11 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * comint-testsuite.el: New file. | ||
| 4 | |||
| 1 | 2010-06-02 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2010-06-02 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * indent: New dir. | 7 | * indent: New dir. |
diff --git a/test/comint-testsuite.el b/test/comint-testsuite.el new file mode 100644 index 00000000000..35b946cf3da --- /dev/null +++ b/test/comint-testsuite.el | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | ;;; bytecomp-testsuite.el | ||
| 2 | |||
| 3 | ;; Copyright (C) 2010 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | ;; it under the terms of the GNU General Public License as published by | ||
| 9 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 10 | ;; (at your option) any later version. | ||
| 11 | |||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ;; GNU General Public License for more details. | ||
| 16 | |||
| 17 | ;; You should have received a copy of the GNU General Public License | ||
| 18 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | ;;; Commentary: | ||
| 21 | |||
| 22 | ;; Tests for comint and related modes. | ||
| 23 | |||
| 24 | ;;; Code: | ||
| 25 | |||
| 26 | (require 'comint) | ||
| 27 | |||
| 28 | (defun comint-testsuite-run () | ||
| 29 | (interactive) | ||
| 30 | (with-output-to-temp-buffer "*comint test*" | ||
| 31 | (comint-testsuite--test-comint-password-prompt-regexp))) | ||
| 32 | |||
| 33 | (defun comint-testsuite--test-comint-password-prompt-regexp () | ||
| 34 | (interactive) | ||
| 35 | (let ((password-strings | ||
| 36 | '("foo@example.net's password: " ;ssh | ||
| 37 | "Password for foo@example.org: " ; knit | ||
| 38 | "Kerberos password for devnull/root <at> GNU.ORG: " ; ksu | ||
| 39 | "Enter passphrase: " ; ssh-add | ||
| 40 | "Enter passphrase (empty for no passphrase): " ; ssh-keygen | ||
| 41 | "Enter same passphrase again: " ; ssh-keygen | ||
| 42 | "Passphrase for key root@GNU.ORG: " ; plink | ||
| 43 | "[sudo] password for user:" ; Ubuntu sudo | ||
| 44 | "Password (again):" | ||
| 45 | "Enter password:")) | ||
| 46 | fail) | ||
| 47 | (dolist (str password-strings) | ||
| 48 | (unless (string-match comint-password-prompt-regexp str) | ||
| 49 | (setq fail t) | ||
| 50 | (princ (format " ERROR: comint-password-prompt-regexp did not match %s\n" | ||
| 51 | str)))) | ||
| 52 | (if fail | ||
| 53 | (princ "FAILED: comint-password-prompt-regexp test\n") | ||
| 54 | (princ "PASSED: comint-password-prompt-regexp test\n")))) | ||
| 55 | |||
| 56 | (provide 'comint-testsuite) | ||
| 57 | |||
| 58 | ;;; comint-testsuite.el ends here | ||
| 59 | |||