annotate test/comint-testsuite.el @ 112184:060a9a41dd53

* net/dbus.el (dbus-unregister-service): Complete doc. Fix call of dbus-error signal.
author Michael Albinus <michael.albinus@gmx.de>
date Mon, 10 Jan 2011 12:21:01 +0100
parents baf0b339ec21
children 6378d1b57038
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
111118
baf0b339ec21 * test/comint-testsuite.el
Glenn Morris <rgm@gnu.org>
parents: 108969
diff changeset
37 "Password for foo@example.org: " ; kinit
baf0b339ec21 * test/comint-testsuite.el
Glenn Morris <rgm@gnu.org>
parents: 108969
diff changeset
38 "Please enter the password for foo@example.org: " ; kinit
108969
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
39 "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
40 "Enter passphrase: " ; ssh-add
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
41 "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
42 "Enter same passphrase again: " ; ssh-keygen
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
43 "Passphrase for key root@GNU.ORG: " ; plink
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
44 "[sudo] password for user:" ; Ubuntu sudo
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
45 "Password (again):"
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
46 "Enter password:"))
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
47 fail)
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
48 (dolist (str password-strings)
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
49 (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
50 (setq fail t)
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
51 (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
52 str))))
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
53 (if fail
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
54 (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
55 (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
56
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
57 (provide 'comint-testsuite)
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
58
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
59 ;;; comint-testsuite.el ends here
cdae067c62d3 Fix for comint-password-prompt-regexp (Bug#6367).
Chong Yidong <cyd@stupidchicken.com>
parents:
diff changeset
60