<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,9 +2,6 @@ This is a simple library for managing your personal unit tests. If
 you're unfamiliar with the concept, please read [this blog post][].
 [Michal Wallace][] came up with the idea. Here's how he describes them:
 
-   [this blog post]: http://withoutane.com/rants/2007/08/personal-unit-tests
-   [Michal Wallace]: http://withoutane.com/
-
 &gt; The way I see it, there are certain things I ought to be doing to be
 &gt; productive and effective no matter what my goals are. These are things
 &gt; that are relatively easy to set up, but take discipline and awareness
@@ -23,3 +20,9 @@ Here's an example use of `selftest.el`:
       :when 'always)
 
 The command `selftest-run` may be used to run all of your tests.
+
+This library relies on [read-char-spec.el][].
+
+[Michal Wallace]: http://withoutane.com/
+[read-char-spec.el]: http://edward.oconnor.cx/elisp/read-char-spec.el
+[this blog post]: http://withoutane.com/rants/2007/08/personal-unit-tests</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 ;;; selftest.el --- Personal unit tests
 
-;; Copyright (C) 2007  Edward O'Connor
+;; Copyright (C) 2007, 2008, 2009  Edward O'Connor
 
 ;; Author: Edward O'Connor &lt;hober0@gmail.com&gt;
 ;; Keywords: convenience
@@ -43,9 +43,13 @@
 ;; 2007-09-14: Added automatic Twitter posting.
 ;;             Uses (a patched version of) twit.el, which see.
 ;; 2008-01-08: Added ability to filter when each test should be taken.
+;; 2009-06-19: Use `read-char-spec' for `selftest-ask' UI.
 
 ;;; Code:
 
+;; Latest version at http://edward.oconnor.cx/elisp/read-char-spec.el
+(require 'read-char-spec)
+
 (defvar selftest-tests '())
 
 (defvar selftest-twitter-results t
@@ -54,16 +58,11 @@ Requires twit.el, which is available on the EmacsWiki.&quot;)
 
 (defun selftest-ask (prompt)
   &quot;Like `y-or-n-p', but asks (with PROMPT) for pass, fail, or skip.&quot;
-  (setq prompt (format &quot;%s (pass, fail, or skip)? &quot; prompt))
-  (let* ((answers '((&quot;pass&quot; . :pass) (&quot;fail&quot; . :fail) (&quot;skip&quot; . :skip)
-                    (&quot;p&quot; . :pass) (&quot;f&quot; . :fail) (&quot;s&quot; . :skip)
-                    (&quot;y&quot; . :pass) (&quot;n&quot; . :fail)))
-         (answer &quot;&quot;))
-    (while (string-equal answer &quot;&quot;)
-      (setq answer (completing-read prompt answers nil t)))
-    ;; &quot;And just in case my point you have missed
-    ;; Somehow I preferred (CDR (ASSQ KEY A-LIST))&quot;
-    (cdr (assoc answer answers))))
+  (read-char-spec prompt '((?p :pass &quot;You passed this test&quot;)
+                           (?f :fail &quot;You failed this test&quot;)
+                           (?y :pass &quot;You passed this test&quot;)
+                           (?n :fail &quot;You failed this test&quot;)
+                           (?s :skip &quot;You're skipping this test&quot;))))
 
 (defmacro define-selftest (slug question &amp;rest params)
   &quot;Defines a new personal unit test named SLUG.</diff>
      <filename>selftest.el</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e4b4aa7def3addfb9dddd6099360ae0c7b4ec8f2</id>
    </parent>
  </parents>
  <author>
    <name>Edward O'Connor</name>
    <email>hober0@gmail.com</email>
  </author>
  <url>http://github.com/hober/selftest-el/commit/e1e18481cfc4a4a875e573018671771db8052d2e</url>
  <id>e1e18481cfc4a4a875e573018671771db8052d2e</id>
  <committed-date>2009-06-19T13:54:38-07:00</committed-date>
  <authored-date>2009-06-19T13:54:38-07:00</authored-date>
  <message>Use `read-char-spec' for `selftest-ask'.</message>
  <tree>f7a41b686036cbef6943f525990c72d739a0cd09</tree>
  <committer>
    <name>Edward O'Connor</name>
    <email>hober0@gmail.com</email>
  </committer>
</commit>
