rustdoc: Fix some remaining bugs around native mods

This commit is contained in:
Brian Anderson
2012-02-24 15:22:57 -08:00
parent 6e31983179
commit 9b009ea23d
2 changed files with 20 additions and 1 deletions

View File

@@ -158,6 +158,9 @@ fn should_write_crate_description() {
}
fn write_nmod(ctxt: ctxt, doc: doc::nmoddoc) {
let fullpath = str::connect(doc.path() + [doc.name()], "::");
write_header(ctxt, h1, #fmt("Native module `%s`", fullpath));
write_brief(ctxt, doc.brief());
write_desc(ctxt, doc.desc());
@@ -169,6 +172,8 @@ fn write_nmod(ctxt: ctxt, doc: doc::nmoddoc) {
#[test]
fn should_write_native_mods() {
let markdown = test::render("#[doc = \"test\"] native mod a { }");
log(error, markdown);
assert str::contains(markdown, "Native module `a`");
assert str::contains(markdown, "test");
}