Skip to content

Commit 3bd61b3

Browse files
committed
test markdown template context
1 parent 371d420 commit 3bd61b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/minicrater/driver.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ trait Compare {
9999
enum Reports {
100100
Raw,
101101
HTMLContext,
102+
MarkdownContext,
102103
}
103104

104105
impl Compare for Reports {
@@ -110,12 +111,13 @@ impl Compare for Reports {
110111
"downloads.html.context.json".into(),
111112
"full.html.context.json".into(),
112113
],
114+
Self::MarkdownContext => vec!["markdown.md.context.json".into()],
113115
}
114116
}
115117

116118
fn format(&self, input: Vec<u8>) -> Vec<u8> {
117119
let parsed_report = match *self {
118-
Self::HTMLContext => {
120+
Self::HTMLContext | Self::MarkdownContext => {
119121
if let Value::Object(mut map) =
120122
serde_json::from_slice(&input).expect("invalid json report")
121123
{
@@ -198,6 +200,7 @@ impl MinicraterRun {
198200

199201
failed |= Reports::Raw.compare(&ex_dir, report_dir.path());
200202
failed |= Reports::HTMLContext.compare(&ex_dir, report_dir.path());
203+
failed |= Reports::MarkdownContext.compare(&ex_dir, report_dir.path());
201204

202205
// Delete the experiment
203206
Command::crater()

0 commit comments

Comments
 (0)