Skip to content

Commit e150d95

Browse files
committed
Add: with-simulated-input
1 parent a15c9d3 commit e150d95

File tree

2 files changed

+41
-17
lines changed

2 files changed

+41
-17
lines changed

README.org

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2170,6 +2170,14 @@ It provides:
21702170
Assess aims to be a stateless as possible, leaving Emacs unchanged whether the tests succeed or fail, with respect to buffers, open files and so on; this helps to keep tests independent from each other.
21712171
#+END_QUOTE
21722172

2173+
**** [[https://github.com/DarwinAwardWinner/with-simulated-input][with-simulated-input: Test interactive functions non-interactively]]
2174+
2175+
#+BEGIN_QUOTE
2176+
This package provides an 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~.
2177+
2178+
Some interactive functions rely on idle timers to do their work, so you might need a way to simulate idleness. For that, there is the ~wsi-simulate-idle-time~ function. You can insert calls to this function in between input strings.
2179+
#+END_QUOTE
2180+
21732181
*** Tools :tools:
21742182

21752183
**** [[https://github.com/jorgenschaefer/emacs-buttercup][buttercup: Behavior-Driven Emacs Lisp Testing]]

0 commit comments

Comments
 (0)