[racket-dev] wishes

From: Kevin Tew (tewk at cs.utah.edu)
Date: Fri May 6 11:55:55 EDT 2011

On 05/06/2011 09:44 AM, Vincent St-Amour wrote:
> At Fri, 6 May 2011 11:22:48 -0400,
> Matthias Felleisen wrote:
>> 1. Python seems to provide the following unit testing functionality:
>>     if a file/module is run as 'main', the test suites are run;
>>     if it is required into some other file, the tests aren't run.
>>     It looks truly convenient. I believe we should be able to write a
>>     define-test-suite macro that can do that too.
> Along these lines, a "raco test" command that runs the tests for a
> file, without running the program itself, would be great.
> Vincent
> _________________________________________________
>    For list-related administrative tasks:
>    http://lists.racket-lang.org/listinfo/dev
racket -tm some_module.rkt  runs the main function in some_module.rkt. 
with the command-line arguments

Welcome to Racket v5.1.1.4.
racket [<option> ...] <argument> ...
  File and expression options:
  -t <file>, --require <file> : Like -e '(require (file "<file>"))'
  -m, --main : Call `main' with command-line arguments, print results

I would like racket -tM some_module.rkt some_function to run 
some_function in the same manner as -tm runs main.
racket -tM my_module.rkt  main
racket -tM my_module.rkt  core-tests
racket -tM my_module.rkt  tests

Posted on the dev mailing list.