Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Apr 22, 2017
1 parent d79b511 commit 91fb6bc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/librustdoc/html/markdown.rs
Expand Up @@ -1094,6 +1094,7 @@ pub fn plain_summary_line(md: &str) -> String {
mod tests {
use super::{LangString, Markdown, MarkdownHtml};
use super::plain_summary_line;
use super::RenderType;
use html::render::reset_ids;

#[test]
Expand Down Expand Up @@ -1134,14 +1135,14 @@ mod tests {
#[test]
fn issue_17736() {
let markdown = "# title";
format!("{}", Markdown(markdown));
format!("{}", Markdown(markdown, RenderType::Pulldown));
reset_ids(true);
}

#[test]
fn test_header() {
fn t(input: &str, expect: &str) {
let output = format!("{}", Markdown(input));
let output = format!("{}", Markdown(input, RenderType::Pulldown));
assert_eq!(output, expect, "original: {}", input);
reset_ids(true);
}
Expand All @@ -1163,7 +1164,7 @@ mod tests {
#[test]
fn test_header_ids_multiple_blocks() {
fn t(input: &str, expect: &str) {
let output = format!("{}", Markdown(input));
let output = format!("{}", Markdown(input, RenderType::Pulldown));
assert_eq!(output, expect, "original: {}", input);
}

Expand Down Expand Up @@ -1204,7 +1205,7 @@ mod tests {
#[test]
fn test_markdown_html_escape() {
fn t(input: &str, expect: &str) {
let output = format!("{}", MarkdownHtml(input));
let output = format!("{}", MarkdownHtml(input, RenderType::Pulldown));
assert_eq!(output, expect, "original: {}", input);
}

Expand Down

0 comments on commit 91fb6bc

Please sign in to comment.