nitunit: test only block of code
authorJean Privat <jean@pryen.org>
Thu, 13 Nov 2014 18:14:08 +0000 (13:14 -0500)
committerJean Privat <jean@pryen.org>
Mon, 17 Nov 2014 14:26:30 +0000 (09:26 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/testing/testing_doc.nit

index f393950..ffac328 100644 (file)
@@ -36,6 +36,9 @@ class NitUnitExecutor
 
        redef fun process_code(n: HTMLTag, text: String)
        do
+               # Skip non-blocks
+               if n.tag != "pre" then return
+
                # Try to parse it
                var ast = toolcontext.parse_something(text)