Changeset 27374 in project
- Timestamp:
- 09/03/12 20:28:16 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wiki/eggref/4/dummy-user
r27373 r27374 35 35 <procedure>(with-dummy-user USER THUNK [RETURN-RESULT])</procedure> 36 36 37 Tests a program with a dummy user . The {{USER}} argument should be a closure such as that produced by {{make-dummy-user}}. {{THUNK}} is a procedure of no arguments that runs the program you wish to test, with {{stdin}} and {{stdout}} bound to the ports provided by {{USER}}. By default, this procedurecalls {{(USER 'dump)}} and returns the result of that call. However, you may provide your own {{RETURN-RESULT}} procedure (with 0 arguments) to cause other data to be returned (e.g. the inputs collected by your program).37 Tests a program with a dummy user; to be precise, it binds {{stdin}} and {{stdout}} to the port provided by the dummy user. The {{USER}} argument should be a closure such as that produced by {{make-dummy-user}}. {{THUNK}} is a procedure of no arguments that runs the program you wish to test. After running the test program, by default {{with-dummy-user}} calls {{(USER 'dump)}} and returns the result of that call. However, you may provide your own {{RETURN-RESULT}} procedure (with 0 arguments) to cause other data to be returned (e.g. the inputs collected by your program). 38 38 39 39 === Examples
Note: See TracChangeset
for help on using the changeset viewer.