man: update documentation of nitunit with groups and markdown files
authorJean Privat <jean@pryen.org>
Sat, 14 Mar 2015 06:45:22 +0000 (13:45 +0700)
committerJean Privat <jean@pryen.org>
Wed, 18 Mar 2015 03:57:11 +0000 (10:57 +0700)
Signed-off-by: Jean Privat <jean@pryen.org>

share/man/nitunit.md

index 4f45562..b43004f 100644 (file)
@@ -12,14 +12,16 @@ nitunit [*options*] FILE...
 
 Unit testing in Nit can be achieved in two ways:
 
-* using `DocUnits` in code comments
+* using `DocUnits` in code comments or in markdown files
 * using `TestSuites` with test unit files
 
-`DocUnits` are executable pieces of code found in the documentation of modules,
+`DocUnits` are executable pieces of code found in the documentation of groups, modules,
 classes and properties.
 They are used for documentation purpose, they should be kept simple and illustrative.
 More advanced unit testing can be done using TestSuites.
 
+`DocUnits` can also be used in any markdown files.
+
 `TestSuites` are test files coupled to a tested module.
 They contain a list of test methods called TestCase.
 
@@ -106,6 +108,14 @@ The `nitunit` command is used to test Nit files:
 
     $ nitunit foo.nit
 
+Groups (directories) can be given to test the documentation of the group and of all its Nit files:
+
+    $ nitunit lib/foo
+
+Finally, standard markdown documents can be checked with:
+
+    $ nitunit foo.md
+
 ## Working with `TestSuites`
 
 TestSuites are Nit files that define a set of TestCases for a particular module.