emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104163: Convert test/comint-testsuit


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104163: Convert test/comint-testsuite.el to ERT format.
Date: Sun, 08 May 2011 17:43:07 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104163
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2011-05-08 17:43:07 -0400
message:
  Convert test/comint-testsuite.el to ERT format.
renamed:
  test/comint-testsuite.el => test/automated/comint-testsuite.el
modified:
  test/ChangeLog
  test/automated/font-parse-tests.el
  test/automated/comint-testsuite.el
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2011-04-06 12:18:10 +0000
+++ b/test/ChangeLog    2011-05-08 21:43:07 +0000
@@ -1,3 +1,9 @@
+2011-05-08  Chong Yidong  <address@hidden>
+
+       * automated/font-parse-tests.el: Don't byte-compile.
+
+       * automated/comint-testsuite.el: Move from test/.  Convert to ERT.
+
 2011-03-10  Stefan Monnier  <address@hidden>
 
        * automated/lexbind-tests.el: New file.

=== renamed file 'test/comint-testsuite.el' => 
'test/automated/comint-testsuite.el'
--- a/test/comint-testsuite.el  2011-01-25 04:08:28 +0000
+++ b/test/automated/comint-testsuite.el        2011-05-08 21:43:07 +0000
@@ -1,4 +1,4 @@
-;;; bytecomp-testsuite.el
+;;; comint-testsuite.el
 
 ;; Copyright (C) 2010-2011  Free Software Foundation, Inc.
 
@@ -24,37 +24,29 @@
 ;;; Code:
 
 (require 'comint)
-
-(defun comint-testsuite-run ()
-  (interactive)
-  (with-output-to-temp-buffer "*comint test*"
-    (comint-testsuite--test-comint-password-prompt-regexp)))
-
-(defun comint-testsuite--test-comint-password-prompt-regexp ()
-  (interactive)
-  (let ((password-strings
-        '("address@hidden's password: " ;ssh
-          "Password for address@hidden: " ; kinit
-          "Please enter the password for address@hidden: "   ; kinit
-          "Kerberos password for devnull/root <at> GNU.ORG: " ; ksu
-          "Enter passphrase: " ; ssh-add
-          "Enter passphrase (empty for no passphrase): " ; ssh-keygen
-          "Enter same passphrase again: "     ; ssh-keygen
-          "Passphrase for key address@hidden: " ; plink
-          "[sudo] password for user:" ; Ubuntu sudo
-          "Password (again):"
-          "Enter password:"))
-       fail)
-    (dolist (str password-strings)
-      (unless (string-match comint-password-prompt-regexp str)
-       (setq fail t)
-       (princ (format " ERROR: comint-password-prompt-regexp did not match 
%s\n"
-                      str))))
-    (if fail
-       (princ "FAILED: comint-password-prompt-regexp test\n")
-      (princ "PASSED: comint-password-prompt-regexp test\n"))))
-
-(provide 'comint-testsuite)
+(require 'ert)
+
+(defvar comint-testsuite-password-strings
+  '("address@hidden's password: " ;ssh
+    "Password for address@hidden: " ; kinit
+    "Please enter the password for address@hidden: "   ; kinit
+    "Kerberos password for devnull/root <at> GNU.ORG: " ; ksu
+    "Enter passphrase: " ; ssh-add
+    "Enter passphrase (empty for no passphrase): " ; ssh-keygen
+    "Enter same passphrase again: "     ; ssh-keygen
+    "Passphrase for key address@hidden: " ; plink
+    "[sudo] password for user:" ; Ubuntu sudo
+    "Password (again):"
+    "Enter password:")
+  "List of strings that should match `comint-password-prompt-regexp'.")
+
+(ert-deftest comint-test-password-regexp ()
+  "Test `comint-password-prompt-regexp' against common password strings."
+  (dolist (str comint-testsuite-password-strings)
+    (should (string-match comint-password-prompt-regexp str))))
+
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
 
 ;;; comint-testsuite.el ends here
-

=== modified file 'test/automated/font-parse-tests.el'
--- a/test/automated/font-parse-tests.el        2011-02-14 21:21:42 +0000
+++ b/test/automated/font-parse-tests.el        2011-05-08 21:43:07 +0000
@@ -158,4 +158,8 @@
        (insert "\n"))))
   (goto-char (point-min)))
 
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
+
 ;;; font-parse-tests.el ends here.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]