Merge: Added contributing guidelines and link from readme
[nit.git] / src / nitunit.nit
index 8d79e80..996fe27 100644 (file)
@@ -20,7 +20,7 @@ import testing
 
 var toolcontext = new ToolContext
 
-toolcontext.option_context.add_option(toolcontext.opt_full, toolcontext.opt_output, toolcontext.opt_dir, toolcontext.opt_noact, toolcontext.opt_pattern, toolcontext.opt_file, toolcontext.opt_gen_unit, toolcontext.opt_gen_force, toolcontext.opt_gen_private, toolcontext.opt_gen_show, toolcontext.opt_nitc)
+toolcontext.option_context.add_option(toolcontext.opt_full, toolcontext.opt_output, toolcontext.opt_dir, toolcontext.opt_noact, toolcontext.opt_pattern, toolcontext.opt_autosav, toolcontext.opt_gen_unit, toolcontext.opt_gen_force, toolcontext.opt_gen_private, toolcontext.opt_gen_show, toolcontext.opt_nitc)
 toolcontext.tooldescription = "Usage: nitunit [OPTION]... <file.nit>...\nExecutes the unit tests from Nit source files."
 
 toolcontext.process_options(args)
@@ -31,10 +31,6 @@ if toolcontext.opt_gen_unit.value then
                print "Option --pattern cannot be used with --gen-suite"
                exit(0)
        end
-       if toolcontext.opt_file.value != null then
-               print "Option --target-file cannot be used with --gen-suite"
-               exit(0)
-       end
 else
        if toolcontext.opt_gen_force.value then
                print "Option --force must be used with --gen-suite"
@@ -92,7 +88,8 @@ end
 
 for m in mmodules do
        page.add modelbuilder.test_markdown(m)
-       page.add modelbuilder.test_unit(m)
+       var ts = modelbuilder.test_unit(m)
+       if ts != null then page.add ts
 end
 
 var file = toolcontext.opt_output.value