emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/with-simulated-input 6f338aeaed 003/134: Add a README


From: ELPA Syncer
Subject: [nongnu] elpa/with-simulated-input 6f338aeaed 003/134: Add a README
Date: Mon, 10 Jan 2022 22:59:57 -0500 (EST)

branch: elpa/with-simulated-input
commit 6f338aeaedc9a4f5cd3d2dbee9742ceb01a66728
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Ryan C. Thompson <rct@thompsonclan.org>

    Add a README
---
 README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..c7cb9208d5
--- /dev/null
+++ b/README.md
@@ -0,0 +1,44 @@
+# with-simulated-input
+
+[![Build 
Status](https://travis-ci.org/DarwinAwardWinner/with-simulated-input.svg?branch=master)](https://travis-ci.org/DarwinAwardWinner/with-simulated-input)
+<!-- (Not in MELPA yet) [![MELPA 
Stable](https://stable.melpa.org/packages/with-simulated-input-badge.svg)](https://stable.melpa.org/#/with-simulated-input)
 -->
+
+This package provides a single Emacs Lisp macro,
+`with-simulated-input`, which evaluates one or more forms while
+simulating a sequence of input events for those forms to read. The
+result is the same as if you had evaluated the forms and then manually
+typed in the same input. This macro is useful for non-interactive
+testing of normally interactive commands and functions, such as
+`completing-read`.
+
+For example:
+
+```elisp
+(with-simulated-input
+    "hello SPC world RET"
+  (read-string "Say hello: "))
+```
+
+This would return the string `"hello world"`.
+
+<!-- Get it from MELPA: https://stable.melpa.org/#/with-simulated-input -->
+
+## Running the tests
+
+This package comes with a test suite. If you want to run it yourself,
+first install the [cask](http://cask.readthedocs.io/en/latest/)
+dependency manager. Then, from the package directory, run `cask
+install` to install all the development dependencies, in
+particular [ert-runner](https://github.com/rejeep/ert-runner.el).
+Finally, to run the tests, execute `cask exec ert-runner`. You should
+see something like this:
+
+```
+$ cask exec ert-runner
+.
+
+Ran 1 test in 0.015 seconds
+````
+
+Please run the tests before submitting any pull requests, and note in
+the pull request whether any of the tests fail.



reply via email to

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