benchs: protect mangle groups of options in `bench_nitg*_options`
[nit.git] / src / nitunit.nit
index 54e9302..4dceda0 100644 (file)
@@ -70,7 +70,7 @@ class NitUnitExecutor
        do
                block.clear
 
-               work(ndoc)
+               work(ndoc.to_mdoc)
 
                if block.is_empty then return
 
@@ -221,15 +221,10 @@ end
 var toolcontext = new ToolContext
 
 toolcontext.option_context.add_option(toolcontext.opt_full, toolcontext.opt_output, toolcontext.opt_dir)
+toolcontext.tooldescription = "Usage: nitunit [OPTION]... <file.nit>...\nExecutes the unit tests from Nit source files."
 
-
-toolcontext.process_options
+toolcontext.process_options(args)
 var args = toolcontext.option_context.rest
-if args.is_empty or toolcontext.opt_help.value then
-       print "usage: nitunit [options] file.nit..."
-       toolcontext.option_context.usage
-       return
-end
 
 var model = new Model
 var modelbuilder = new ModelBuilder(model, toolcontext)