# Test a document object unrelated to a Nit entity
fun test_mdoc(mdoc: MDoc): HTMLTag
do
var ts = new HTMLTag("testsuite")
var file = mdoc.location.file.as(not null).filename
toolcontext.info("nitunit: doc-unit file {file}", 2)
ts.attr("package", file)
var prefix = toolcontext.test_dir / "file"
var d2m = new NitUnitExecutor(toolcontext, prefix, null, ts, "Docunits of file {file}")
total_entities += 1
doc_entities += 1
# NOTE: jenkins expects a '.' in the classname attr
d2m.extract(mdoc, "nitunit.<file>", file)
d2m.run_tests
return ts
end
src/testing/testing_doc.nit:656,2--677,4