Changeset 27374 in project


Ignore:
Timestamp:
09/03/12 20:28:16 (9 years ago)
Author:
svnwiki
Message:

Anonymous wiki edit for IP [216.241.35.41]: Clarified the description of with-dummy-user

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/dummy-user

    r27373 r27374  
    3535<procedure>(with-dummy-user USER THUNK [RETURN-RESULT])</procedure>
    3636
    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 procedure 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).
     37Tests 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).
    3838
    3939=== Examples
Note: See TracChangeset for help on using the changeset viewer.