Mercurial > emacs
annotate test/comint-testsuite.el @ 109673:0781924c2a38
Remove duplicate declarations.
* lib-src/ebrowse.c (usage, version, mark_virtual)
* src/alloc.c (lisp_malloc)
* src/buffer.c (set_buffer_internal, set_buffer_internal_1)
* src/charset.h (emacs_mule_charset)
* src/dispextern.h (inhibit_free_realized_faces, redraw_frame)
(redraw_garbaged_frames, scroll_cost, update_frame, scrolling)
(bitch_at_user)
* src/lisp.h (Fcheck_coding_system, Fget_text_property)
(Qfunction, Qcompletion_ignore_case, QCwidth, QCsize)
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sat, 07 Aug 2010 03:10:12 +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 |