branch: elpa/with-simulated-input
commit 6f338aeaedc9a4f5cd3d2dbee9742ceb01a66728
Author: Ryan C. Thompson <[email protected]>
Commit: Ryan C. Thompson <[email protected]>
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
+
+[](https://travis-ci.org/DarwinAwardWinner/with-simulated-input)
+<!-- (Not in MELPA yet) [](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.