diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-07-03 07:04:27 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-07-03 07:04:27 +0300 |
commit | 2806ca17e0774089aabc22716ff05206d170994a (patch) | |
tree | e34cfac9d6b940c8df59d7e058e8457ae67beb4e /subplot | |
parent | 68161f6ff932b9a78662c26aefeb9011c15c6bb2 (diff) | |
download | riki-2806ca17e0774089aabc22716ff05206d170994a.tar.gz |
test: inline code markup in markdown
Sponsored-by: author
Diffstat (limited to 'subplot')
-rw-r--r-- | subplot/rikiwiki.rs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/subplot/rikiwiki.rs b/subplot/rikiwiki.rs index 3b73393..ac53df9 100644 --- a/subplot/rikiwiki.rs +++ b/subplot/rikiwiki.rs @@ -37,26 +37,16 @@ fn install_rikiwiki(context: &ScenarioContext) { fn asts_match(context: &Datadir, first: &str, second: &str) { let first = context.canonicalise_filename(first).unwrap(); let second = context.canonicalise_filename(second).unwrap(); - println!("ast_match on {} and {}", first.display(), second.display()); let first = ast(first); let second = ast(second); println!(); - println!("first: {:?}", first); - println!("second: {:?}", second); + println!("first: {:#?}", first); + println!("second: {:#?}", second); assert!(first == second); } fn ast<P: AsRef<Path>>(filename: P) -> Pandoc { let filename = filename.as_ref(); - println!("ast on {} (is_file: {})", filename.display(), filename.is_file()); - println!("cwd={:?}", std::env::current_dir()); - let dir = filename.parent().unwrap(); - println!("dir={} (exists: {})", dir.display(), dir.exists()); - println!("filename={} (is_file: {})", filename.display(), filename.is_file()); - for x in dir.read_dir().unwrap() { - println!("- {}", x.unwrap().path().display()); - } - println!("that's all folks"); assert!(filename.exists()); let mut pandoc = pandoc::new(); @@ -64,14 +54,11 @@ fn ast<P: AsRef<Path>>(filename: P) -> Pandoc { pandoc.set_output_format(pandoc::OutputFormat::Json, vec![]); pandoc.set_output(pandoc::OutputKind::Pipe); let pandoc = pandoc.execute().unwrap(); - println!("exexuted pandoc"); let json = match pandoc { pandoc::PandocOutput::ToFile(x) => panic!("to file: {:?}", x), pandoc::PandocOutput::ToBuffer(x) => x, pandoc::PandocOutput::ToBufferRaw(x) => panic!("to raw buffer: {:?}", x), }; - println!("got JSON: {:.20?}", json); let json = serde_json::from_str(&json).unwrap(); - println!("JSON: {:?}", json); json } |